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.
|
|
2 days ago | |
|---|---|---|
| .. | ||
| Properties | 5 days ago | |
| FactoryGenerator.cs | 2 days ago | |
| LightweightIocContainer.FactoryGenerator.csproj | 2 days ago | |
| README.md | 3 days ago | |
README.md
Get started with the Lightweight IOC Container Factory Generator
How to install
The easiest way to install the Lightweight IOC Container is by using NuGet through the .NET CLI:
> dotnet add package LightweightIocContainer.FactoryGenerator --version 5.0.0
Example usage
When registering an interface you can use the WithGeneratedFactory<>() method to generate a factory for the registered type:
public class SampleInstaller : IIocInstaller
{
public void Install(IRegistrationCollector registration)
{
registration.Add<ISampleClass, SampleClass>().WithGeneratedFactory<ISampleClassFactory>();
}
}