|
|
7 years ago | |
|---|---|---|
| LightweightIocContainer | 7 years ago | |
| Test.LightweightIocContainer | 7 years ago | |
| .gitattributes | 7 years ago | |
| .gitignore | 7 years ago | |
| LICENSE | 7 years ago | |
| LightweightIocContainer.sln | 7 years ago | |
| LightweightIocContainer.sln.DotSettings | 7 years ago | |
| README.md | 7 years ago | |
README.md
Lightweight IOC Container
A lightweight IOC Container that is powerful enough to do all the things you need it to do.
This project and its documentation are currently under development.
Get started with the Lightweight IOC Container
How to install
The easiest way to install the Lightweight IOC Container is by using NuGet.
You can either use the PackageManager in VisualStudio:
PM> Install-Package LightweightIocContainer -Version 1.0.0
or you can use the .NET CLI:
> dotnet add package LightweightIocContainer --version 1.0.0
Example usage
-
Instantiate container:
IocContainer container = new IocContainer(); -
Install
IIocInstallers for the container:container.Install(new Installer()); -
Resolve one instance from the container:
IFooFactory fooFactory = container.Resolve<IFooFactory>(); -
Use this instance to create what your application needs:
IFoo foo = fooFactory.Create(); -
When your application is finished, don't forget to dispose your
IocContainer:container.Dispose();
Demo Project
There is a demo project available where you can check out how different functions of the Lightweight IOC Container can be used.
This demo project is updated with new versions of the Lightweight IOC Container to show the usage of newly implemented functions.