Injectio - Source Generator for Dependency Injection
Source generator that helps register discovered services in the dependency injection container
Features
- Transient, Singleton, Scoped service registration
- Factory registration
- Module method registration
- Duplicate Strategy - Skip,Replace,Append
- Registration Strategy - Self, Implemented Interfaces, Self With Interfaces
Usage
Add package
Add the nuget package project to your projects.
dotnet add package Injectio
Prevent dependances from including Injectio
<PackageReference Include="Injectio" PrivateAssets="all" />
Registration Attributes
Place registration attribute on class. The class will be discovered and registered.