- prepare for version 3.0.0

pull/57/head v3.0.0
Simon G 4 years ago
parent 50ee006585
commit 1072e62563
  1. 1
      LightweightIocContainer/LightweightIocContainer.csproj
  2. 28
      README.md
  3. 3
      Test.LightweightIocContainer/Test.LightweightIocContainer.csproj

@ -10,7 +10,6 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<DocumentationFile>LightweightIocContainer.xml</DocumentationFile> <DocumentationFile>LightweightIocContainer.xml</DocumentationFile>
<VersionPrefix>3.0.0</VersionPrefix> <VersionPrefix>3.0.0</VersionPrefix>
<VersionSuffix>beta3</VersionSuffix>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

@ -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: You can either use the [`PackageManager`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#packagemanager) in VisualStudio:
```PM ```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): or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#net-cli):
```.net ```.net
> dotnet add package LightweightIocContainer --version 3.0.0-beta2 > dotnet add package LightweightIocContainer --version 3.0.0
``` ```
### Example usage ### 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): 1. [Instantiate `IocContainer`](https://github.com/SimonG96/LightweightIocContainer/wiki/Simple-Usage-of-Lightweight-IOC-Container#instantiate-container):
```c# ```c#
IocContainer container = new IocContainer(); IocContainer container = new();
``` ```
2. Install [`IIocInstaller`s](https://github.com/SimonG96/LightweightIocContainer/wiki/IIocInstaller) for the container: 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(); 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 ### 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. There is a [demo project][demoProjectLink] available where you can check out how different functions of the Lightweight IOC Container can be used.

@ -3,10 +3,9 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<Version>3.0.0-beta3</Version>
<Authors>SimonG</Authors> <Authors>SimonG</Authors>
<LangVersion>default</LangVersion> <LangVersion>default</LangVersion>
<PackageVersion>3.0.0-beta3</PackageVersion> <VersionPrefix>3.0.0</VersionPrefix>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

Loading…
Cancel
Save