diff --git a/LightweightIocContainer/Interfaces/Registrations/IRegistrationBase.cs b/LightweightIocContainer/Interfaces/Registrations/IRegistrationBase.cs index 6135eed..b90b444 100644 --- a/LightweightIocContainer/Interfaces/Registrations/IRegistrationBase.cs +++ b/LightweightIocContainer/Interfaces/Registrations/IRegistrationBase.cs @@ -10,7 +10,7 @@ namespace LightweightIocContainer.Interfaces.Registrations /// The that is used to register an Interface /// /// The registered Interface - public interface IRegistrationBase : IRegistration, IOnCreate, IWithParameters + public interface IRegistrationBase : IRegistration, IWithParameters { /// /// The Lifestyle of Instances that are created with this diff --git a/LightweightIocContainer/Registrations/RegistrationBase.cs b/LightweightIocContainer/Registrations/RegistrationBase.cs index 512fed9..8e0f617 100644 --- a/LightweightIocContainer/Registrations/RegistrationBase.cs +++ b/LightweightIocContainer/Registrations/RegistrationBase.cs @@ -43,25 +43,6 @@ namespace LightweightIocContainer.Registrations /// public Lifestyle Lifestyle { get; } - - /// - /// This is invoked when an instance of this type is created. - /// Can be set in the by calling - /// - public Action OnCreateAction { get; private set; } - - - /// - /// Pass an that will be invoked when an instance of this is created - /// - /// The - /// The current instance of this - public IRegistrationBase OnCreate(Action action) - { - OnCreateAction = action; - return this; - } - /// /// An of parameters that are used to an instance of this /// Can be set in the by calling @@ -75,7 +56,7 @@ namespace LightweightIocContainer.Registrations /// The parameters /// The current instance of this /// are already set or no parameters given - public IRegistrationBase WithParameters(params object[] parameters) + public virtual IRegistrationBase WithParameters(params object[] parameters) { if (Parameters != null) throw new InvalidRegistrationException($"Don't use `WithParameters()` method twice (Type: {InterfaceType})."); @@ -94,7 +75,7 @@ namespace LightweightIocContainer.Registrations /// The parameters with their position /// The current instance of this /// are already set or no parameters given - public IRegistrationBase WithParameters(params (int index, object parameter)[] parameters) + public virtual IRegistrationBase WithParameters(params (int index, object parameter)[] parameters) { if (Parameters != null) throw new InvalidRegistrationException($"Don't use `WithParameters()` method twice (Type: {InterfaceType}).");