From b8e34cc852c64de0c02eee895788e08bb1c12e13 Mon Sep 17 00:00:00 2001 From: Simon G Date: Thu, 1 Sep 2022 12:08:52 +0200 Subject: [PATCH] - update readmes --- LightweightIocContainer.Validation/README.md | 27 +---------- README.md | 49 +++++++++++++++----- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/LightweightIocContainer.Validation/README.md b/LightweightIocContainer.Validation/README.md index cae2447..285cab9 100644 --- a/LightweightIocContainer.Validation/README.md +++ b/LightweightIocContainer.Validation/README.md @@ -1,28 +1,11 @@ -# Lightweight IOC Container - -A lightweight IOC Container that is powerful enough to do all the things you need it to do. - -[![GitHub Actions](https://github.com/SimonG96/LightweightIocContainer/workflows/CI/badge.svg)](https://github.com/SimonG96/LightweightIocContainer/actions) - -[![Nuget](https://img.shields.io/nuget/dt/LightweightIocContainer.svg?label=NuGet%20Downloads&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) -[![Nuget](https://img.shields.io/nuget/v/LightweightIocContainer.svg?label=NuGet%20Version&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) -[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/LightweightIocContainer.svg?label=NuGet%20Pre-Release&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) - ## Get started with the Lightweight IOC Container Validator ### How to install -The easiest way to [install](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container) the Lightweight IOC Container is by using [NuGet](https://www.nuget.org/packages/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.Validator -Version 4.0.0-beta4 -``` - -or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#net-cli): +The easiest way to [install](https://github.com/SimonG96/LghtweightIocContainer/wiki/Install-Lightweight-IOC-Container) the Lightweight IOC Container is by using [NuGet](https://www.nuget.org/packages/LightweightIocContainer.Validation/) through the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#net-cli): ```.net -> dotnet add package LightweightIocContainer.Validator --version 4.0.0-beta4 +> dotnet add package LightweightIocContainer.Validaton --version 4.0.0-beta5 ``` ### Validation @@ -46,9 +29,3 @@ public class IocValidationTest ``` 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. - -[demoProjectLink]: https://github.com/SimonG96/LightweightIocContainer_Example diff --git a/README.md b/README.md index c48d17c..c082c87 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,22 @@ A lightweight IOC Container that is powerful enough to do all the things you nee [![GitHub Actions](https://github.com/SimonG96/LightweightIocContainer/workflows/CI/badge.svg)](https://github.com/SimonG96/LightweightIocContainer/actions) -[![Nuget](https://img.shields.io/nuget/dt/LightweightIocContainer.svg?label=NuGet%20Downloads&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) -[![Nuget](https://img.shields.io/nuget/v/LightweightIocContainer.svg?label=NuGet%20Version&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) -[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/LightweightIocContainer.svg?label=NuGet%20Pre-Release&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) +[![Nuget](https://img.shields.io/nuget/dt/LightweightIocContainer.svg?label=IocContainer%20NuGet%20Downloads&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) +[![Nuget](https://img.shields.io/nuget/v/LightweightIocContainer.svg?label=IocContainer%20NuGet%20Version&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) +[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/LightweightIocContainer.svg?label=IocContainer%20NuGet%20Pre-Release&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer/) + +[![Nuget](https://img.shields.io/nuget/dt/LightweightIocContainer.svg?label=Validation%20NuGet%20Downloads&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer.Validation/) +[![Nuget](https://img.shields.io/nuget/v/LightweightIocContainer.svg?label=Validation%20NuGet%20Version&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer.Validation/) +[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Validation.svg?label=IocContainer%20NuGet%20Pre-Release&logo=NuGet)](https://www.nuget.org/packages/LightweightIocContainer.Validation/) ## Get started with the Lightweight IOC Container ### How to install -The easiest way to [install](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container) the Lightweight IOC Container is by using [NuGet](https://www.nuget.org/packages/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 4.0.0-beta4 -``` - -or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#net-cli): +The easiest way to [install](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container) the Lightweight IOC Container is by using [NuGet](https://www.nuget.org/packages/LightweightIocContainer/) through the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContainer/wiki/Install-Lightweight-IOC-Container#net-cli): ```.net -> dotnet add package LightweightIocContainer --version 4.0.0-beta4 +> dotnet add package LightweightIocContainer --version 4.0.0-beta5 ``` ### Example usage @@ -57,6 +54,34 @@ or you can use the [`.NET CLI`](https://github.com/SimonG96/LightweightIocContai container.Dispose(); ``` +### Validation + +There is the option to install the [LightweightIocContainer.Validation](https://www.nuget.org/packages/LightweightIocContainer.Validation/) package: + +```.net +> dotnet add package LightweightIocContainer.Validaton --version 4.0.0-beta5 +``` + +With this 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.