A lightweight IOC Container that is powerful enough to do all the things you need it to do.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Simon Gockner 3dc888085d - update version numbers to 1.3.0 6 years ago
.github/workflows - change to on: release 6 years ago
LightweightIocContainer - update version numbers to 1.3.0 6 years ago
Test.LightweightIocContainer - update version numbers to 1.3.0 6 years ago
.gitattributes - add .gitattributes 7 years ago
.gitignore - add vscode folder to gitignore 7 years ago
LICENSE Initial commit 7 years ago
LightweightIocContainer.sln - add unit test 7 years ago
LightweightIocContainer.sln.DotSettings - fix resharper warnings 7 years ago
README.md - update version 6 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.

Build status GitHub Actions

Nuget Nuget Nuget (with prereleases)

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.2.0

or you can use the .NET CLI:

> dotnet add package LightweightIocContainer --version 1.2.0

Example usage

  1. Instantiate IocContainer:

    IocContainer container = new IocContainer();
    
  2. Install IIocInstallers for the container:

    container.Install(new Installer());
    
  3. Resolve one instance from the container:

    IFooFactory fooFactory = container.Resolve<IFooFactory>();
    
  4. Use this instance to create what your application needs:

    IFoo foo = fooFactory.Create();
    
  5. 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.