From 0a006ae787398b371150efeaccbaac1e538d9706 Mon Sep 17 00:00:00 2001 From: "Simon G." Date: Wed, 3 Dec 2025 11:49:03 +0100 Subject: [PATCH] - update readme --- LightweightIocContainer.FactoryGenerator/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/LightweightIocContainer.FactoryGenerator/README.md b/LightweightIocContainer.FactoryGenerator/README.md index e9617c7..c02edb9 100644 --- a/LightweightIocContainer.FactoryGenerator/README.md +++ b/LightweightIocContainer.FactoryGenerator/README.md @@ -7,3 +7,17 @@ The easiest way to [install](https://github.com/SimonG96/LghtweightIocContainer/ ```.net > 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: + +```c# +public class SampleInstaller : IIocInstaller +{ + public void Install(IRegistrationCollector registration) + { + registration.Add().WithGeneratedFactory(); + } +} +```