diff --git a/LightweightIocContainer/Registrations/RegistrationFactory.cs b/LightweightIocContainer/Registrations/RegistrationFactory.cs index d780413..0c4bf61 100644 --- a/LightweightIocContainer/Registrations/RegistrationFactory.cs +++ b/LightweightIocContainer/Registrations/RegistrationFactory.cs @@ -33,6 +33,19 @@ namespace LightweightIocContainer.Registrations return new DefaultRegistration(typeof(TInterface), typeof(TImplementation), lifestyle); } + /// + /// Register multiple interfaces for a that implements them and create a + /// + /// The base interface to register + /// A second interface to register + /// The that implements both interfaces + /// The for this + /// The created + public IMultipleRegistration Register(Lifestyle lifestyle) where TImplementation : TInterface1, TInterface2 + { + return new MultipleRegistration(typeof(TInterface1), typeof(TInterface2), typeof(TImplementation), lifestyle); + } + /// /// Register a without an interface and create a /// @@ -51,7 +64,7 @@ namespace LightweightIocContainer.Registrations /// The Type that implements the interface /// The Type of the multiton scope /// A new created with the given parameters - public IMultitonRegistration Register() where TImplementation : TInterface + public IMultitonRegistration RegisterMultiton() where TImplementation : TInterface { return new MultitonRegistration(typeof(TInterface), typeof(TImplementation), typeof(TScope)); }