- add `WithFactoryMethod()` to set a `FactoryMethod` that gets called when an instance of the registered type is created
- allow registration of only an interface, if you resolve only an interface without a factoryMethod an exception is thrown
thrownewInvalidRegistrationException($"Can't register an interface without its implementation type or without a factory method (Type: {singleTypeRegistration.InterfaceType}).");
if(singleTypeRegistration.FactoryMethod==null)//type registration without interface -> just create this type
The <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> to register either only an interface or only a <seecref="T:System.Type"/>
</summary>
<typeparamname="T">The <seecref="T:System.Type"/> of the <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/></typeparam>
The registration that is used to register an abstract typed factory
@ -579,7 +597,7 @@
<exceptioncref="T:LightweightIocContainer.Exceptions.TypeNotRegisteredException">The given <seecref="T:System.Type"/> is not registered in this <seecref="T:LightweightIocContainer.IocContainer"/></exception>
<exceptioncref="T:LightweightIocContainer.Exceptions.UnknownRegistrationException">The registration for the given <seecref="T:System.Type"/> has an unknown <seecref="T:System.Type"/></exception>
Register a <seecref="T:System.Type"/> without an interface and create a <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/>
Register a <seecref="T:System.Type"/> without an interface and create a <seecref="T:LightweightIocContainer.Interfaces.Registrations.ISingleTypeRegistration`1"/>
</summary>
<typeparamname="TImplementation">The <seecref="T:System.Type"/> to register</typeparam>
<paramname="lifestyle">The <seecref="T:LightweightIocContainer.Lifestyle"/> for this <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/></param>
<returns>A new created <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> with the given parameters</returns>
<typeparamname="T">The <seecref="T:System.Type"/> to register</typeparam>
<paramname="lifestyle">The <seecref="T:LightweightIocContainer.Lifestyle"/> for this <seecref="T:LightweightIocContainer.Interfaces.Registrations.ISingleTypeRegistration`1"/></param>
<returns>A new created <seecref="T:LightweightIocContainer.Interfaces.Registrations.ISingleTypeRegistration`1"/> with the given parameters</returns>
The <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> to register either only an interface or only a <seecref="T:System.Type"/>
</summary>
<typeparamname="T">The <seecref="T:System.Type"/> of the <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/></typeparam>
The <seecref="T:LightweightIocContainer.Interfaces.Registrations.IRegistrationBase`1"/> to register either only an interface or only a <seecref="T:System.Type"/>
</summary>
<paramname="interfaceType">The <seecref="T:System.Type"/> of the interface or <seecref="T:System.Type"/></param>
<paramname="lifestyle">The <seecref="T:LightweightIocContainer.Lifestyle"/> of the <seecref="T:LightweightIocContainer.Registrations.RegistrationBase`1"/></param>