Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1.01 KB

README.md

File metadata and controls

23 lines (15 loc) · 1.01 KB

Inject

NuGet License

A dependency injection container for registering and resolving types.

Usage

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>();

Contributing

Please read CONTRIBUTING.md for details on how to contribute to this project.

License

Inject is released under the MIT License