From 1072e62563870798e4245e4139105c7e234250b1 Mon Sep 17 00:00:00 2001 From: Simon G Date: Fri, 17 Dec 2021 12:46:25 +0100 Subject: [PATCH] - prepare for version 3.0.0 --- .../LightweightIocContainer.csproj | 1 - README.md | 28 +++++++++++++++++-- .../Test.LightweightIocContainer.csproj | 3 +- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/LightweightIocContainer/LightweightIocContainer.csproj b/LightweightIocContainer/LightweightIocContainer.csproj index daf6f0c..971d98b 100644 --- a/LightweightIocContainer/LightweightIocContainer.csproj +++ b/LightweightIocContainer/LightweightIocContainer.csproj @@ -10,7 +10,6 @@ enable LightweightIocContainer.xml 3.0.0 - beta3 diff --git a/README.md b/README.md index 1dc472f..07f6d2e 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ The easiest way to [install](https://github.com/SimonG96/LightweightIocContainer You can either use the [`PackageManager`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#packagemanager) in VisualStudio: ```PM -PM> Install-Package LightweightIocContainer -Version 3.0.0-beta2 +PM> Install-Package LightweightIocContainer -Version 3.0.0 ``` or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#net-cli): ```.net -> dotnet add package LightweightIocContainer --version 3.0.0-beta2 +> dotnet add package LightweightIocContainer --version 3.0.0 ``` ### Example usage @@ -30,7 +30,7 @@ or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContai 1. [Instantiate `IocContainer`](https://github.com/SimonG96/LightweightIocContainer/wiki/Simple-Usage-of-Lightweight-IOC-Container#instantiate-container): ```c# - IocContainer container = new IocContainer(); + IocContainer container = new(); ``` 2. Install [`IIocInstaller`s](https://github.com/SimonG96/LightweightIocContainer/wiki/IIocInstaller) for the container: @@ -57,6 +57,28 @@ or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContai container.Dispose(); ``` +### Validation + +You can validate your `IocContainer` setup by using the `IocValidator` in a unit test: + +```c# +[TestFixture] +public class IocValidationTest +{ + [Test] + public void ValidateIocContainerSetup() + { + IocContainer container = new(); + container.Install(new Installer()); + + IocValidator validator = new(container); + validator.Validate(); + } +} +``` + +If this test is successful, everything is correctly installed and can be resolved by the `IocContainer`. By going through the thrown exceptions in case of a failed test you will see what is not working correctly with your current setup. + ### Demo Project There is a [demo project][demoProjectLink] available where you can check out how different functions of the Lightweight IOC Container can be used. diff --git a/Test.LightweightIocContainer/Test.LightweightIocContainer.csproj b/Test.LightweightIocContainer/Test.LightweightIocContainer.csproj index 9be0550..247e803 100644 --- a/Test.LightweightIocContainer/Test.LightweightIocContainer.csproj +++ b/Test.LightweightIocContainer/Test.LightweightIocContainer.csproj @@ -3,10 +3,9 @@ net6.0 false - 3.0.0-beta3 SimonG default - 3.0.0-beta3 + 3.0.0