#45: add method to create iMultipleMultitonRegistration

pull/47/head
Simon G 5 years ago
parent 17df31ec3f
commit e51298c5e0
  1. 5
      LightweightIocContainer/Registrations/RegistrationFactory.cs

@ -119,6 +119,11 @@ namespace LightweightIocContainer.Registrations
return new MultitonRegistration<TInterface, TImplementation>(typeof(TInterface), typeof(TImplementation), typeof(TScope)); return new MultitonRegistration<TInterface, TImplementation>(typeof(TInterface), typeof(TImplementation), typeof(TScope));
} }
public IMultipleMultitonRegistration<TInterface1, TInterface2, TImplementation> RegisterMultiton<TInterface1, TInterface2, TImplementation, TScope>() where TImplementation : TInterface1, TInterface2
{
return new MultipleMultitonRegistration<TInterface1, TInterface2, TImplementation>(typeof(TInterface1), typeof(TInterface2), typeof(TImplementation), typeof(TScope));
}
/// <summary> /// <summary>
/// Register an Interface as an abstract typed factory and create a <see cref="ITypedFactoryRegistration{TFactory}"/> /// Register an Interface as an abstract typed factory and create a <see cref="ITypedFactoryRegistration{TFactory}"/>
/// </summary> /// </summary>

Loading…
Cancel
Save