Agnostic IoC is a lightweight API to allow you to write your code using Inversion of Control WITHOUT knowing which container will finally be used. Registrations are defined against the Agnostic IoC container manager requiring just a dependency on Agnostic IoC – Core. They can then be used against any of the supported IoC containers (currently Autofac, StructureMap, Castle Windsor and Unity).
This libraries CORE purpose is to decouple code from the final dependency injection framework to allow developers to write libraries for existing products such as Sitecore, Sharepoint, Umbraco or any others and not depend on a specific IoC Container such as Autofac, Unity or Windsor, leaving developers to continue using their IoC container of choice. Support for different IoC containers is performed by way of an adapter, default ones are provided as nuget packages such as Agnostic.IoC.Autofac or Agnostic.IoC.Unity, however simply inheriting from the ContainerAdapter generic.
Agnostic IoC is available on Nuget.
Agnostic IoC is free and Open Source – you can find it on Github.
Currently Agnostic IoC supports:
- Assembly Scanning Registration
- 4 containers with more support coming
- Registration API
- Use of original container types
- Use of multiple containers of using different frameworks (use Autofac and Unity containers simultaneously)