diff --git a/LightweightIocContainer/Interfaces/Registrations/Fluent/IWithFactory.cs b/LightweightIocContainer/Interfaces/Registrations/Fluent/IWithFactory.cs
index b06d491..918a998 100644
--- a/LightweightIocContainer/Interfaces/Registrations/Fluent/IWithFactory.cs
+++ b/LightweightIocContainer/Interfaces/Registrations/Fluent/IWithFactory.cs
@@ -25,6 +25,13 @@ public interface IWithFactory
/// The type of the implementation for the custom factory
/// The current instance of this
IRegistrationBase WithFactory() where TFactoryImplementation : TFactoryInterface;
+
+ ///
+ /// Internal method used by the factory source generator to add the generated factory to the registration
+ ///
+ /// The actual generated factory
+ /// The type of the generated factory
+ void AddGeneratedFactory(TFactory generatedFactory);
}
internal interface IWithFactoryInternal : IWithFactory
diff --git a/LightweightIocContainer/Registrations/RegistrationBase.cs b/LightweightIocContainer/Registrations/RegistrationBase.cs
index ef89a0a..54639b5 100644
--- a/LightweightIocContainer/Registrations/RegistrationBase.cs
+++ b/LightweightIocContainer/Registrations/RegistrationBase.cs
@@ -121,7 +121,12 @@ internal abstract class RegistrationBase : IRegistrationBase, IWithFactoryIntern
return this;
}
- internal void AddGeneratedFactory(TFactory generatedFactory)
+ ///
+ /// Internal method used by the factory source generator to add the generated factory to the registration
+ ///
+ /// The actual generated factory
+ /// The type of the generated factory
+ public void AddGeneratedFactory(TFactory generatedFactory)
{
TypedFactory factory = new(generatedFactory);
Factory = factory;