thrownewMultitonResolveException($"Can not resolve multiton without the first argument being the scope (should be of type {registration.Scope}).",typeof(T));
//if a multiton for the given scope exists return it
varinstances=_multitons.FirstOrDefault(m=>m.type==typeof(T)&&m.scope==registration.Scope).instances;//get instances for the given type and scope
varinstances=_multitons.FirstOrDefault(m=>m.type==registration.ImplementationType&&m.scope==registration.Scope).instances;//get instances for the given type and scope (use implementation type to resolve the correct instance for multiple multiton registrations as well)
An <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> to register multiple interfaces for on implementation type that implements them as a multiton
</summary>
<typeparamname="TInterface1">The first interface</typeparam>
<typeparamname="TInterface2">The second interface</typeparam>
Register an Interface as an abstract typed factory
@ -989,6 +1017,35 @@
<paramname="implementationType">The <seecref="T:System.Type"/> of the implementation</param>
<paramname="lifestyle">The <seecref="T:LightweightIocContainer.Lifestyle"/> of the <seecref="T:LightweightIocContainer.Registrations.RegistrationBase`1"/></param>
An <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> to register multiple interfaces for on implementation type that implements them as a multiton
</summary>
<typeparamname="TInterface1">The first interface</typeparam>
<typeparamname="TInterface2">The second interface</typeparam>
An <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> to register multiple interfaces for on implementation type that implements them as a multiton
</summary>
<paramname="interfaceType1">The <seecref="T:System.Type"/> of the first interface</param>
<paramname="interfaceType2">The <seecref="T:System.Type"/> of the second interface</param>
<paramname="implementationType">The <seecref="T:System.Type"/> of the implementation</param>
<paramname="scope">The <seecref="T:System.Type"/> of the multiton scope</param>
A <seecref="T:System.Collections.Generic.List`1"/> of <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistration"/>s that are registered within this <seecref="T:LightweightIocContainer.Interfaces.Registrations.IMultipleRegistration`2"/>
Register multiple interfaces for a <seecref="T:System.Type"/> that implements them as a multiton
</summary>
<typeparamname="TInterface1">The base interface to register</typeparam>
<typeparamname="TInterface2">A second interface to register</typeparam>
<typeparamname="TImplementation">The Type that implements the interface</typeparam>
<typeparamname="TScope">The Type of the multiton scope</typeparam>
<returns>A new created <seecref="T:LightweightIocContainer.Interfaces.Registrations.IMultipleMultitonRegistration`3"/> with the given parameters</returns>
Register an Interface as an abstract typed factory and create a <seecref="T:LightweightIocContainer.Interfaces.Registrations.ITypedFactoryRegistration`1"/>
/// A <see cref="List{T}"/> of <see cref="IRegistration"/>s that are registered within this <see cref="IMultipleRegistration{TInterface1,TImplementation}"/>
/// </summary>
publicList<IRegistration>Registrations{get;}
/// <summary>
/// Pass an <see cref="Action{T}"/> that will be invoked when an instance of this type is created