A dependency injection container for registering and resolving types.
Install the package from NuGet with dotnet add package Inject
.
Types and instances can be registered in the container, as in the example below. You can also resolve types without registering them, provided that they have only 1 constructor and all of the parameters can also be resolved. The container will throw an exception if any circular dependencies are found.
var container = new InjectContainer();
container.Register<IType, Type>();
var instance = container.Resolve<IType>();
Please read CONTRIBUTING.md for details on how to contribute to this project.
Inject is released under the MIT License