#29: fix return value of `WithFactoryMethod()`

pull/32/head
Simon Gockner 6 years ago
parent 3c636a786e
commit 47931b3dd1
  1. 2
      LightweightIocContainer/Interfaces/Registrations/ISingleTypeRegistration.cs
  2. 2
      LightweightIocContainer/Registrations/SingleTypeRegistration.cs

@ -22,6 +22,6 @@ namespace LightweightIocContainer.Interfaces.Registrations
/// </summary> /// </summary>
/// <param name="factoryMethod">The <see cref="Func{T,TResult}"/></param> /// <param name="factoryMethod">The <see cref="Func{T,TResult}"/></param>
/// <returns>The current instance of this <see cref="IRegistrationBase{TInterface}"/></returns> /// <returns>The current instance of this <see cref="IRegistrationBase{TInterface}"/></returns>
IRegistrationBase<T> WithFactoryMethod(Func<IIocContainer, T> factoryMethod); ISingleTypeRegistration<T> WithFactoryMethod(Func<IIocContainer, T> factoryMethod);
} }
} }

@ -35,7 +35,7 @@ namespace LightweightIocContainer.Registrations
/// </summary> /// </summary>
/// <param name="factoryMethod">The <see cref="Func{T,TResult}"/></param> /// <param name="factoryMethod">The <see cref="Func{T,TResult}"/></param>
/// <returns>The current instance of this <see cref="IRegistrationBase{TInterface}"/></returns> /// <returns>The current instance of this <see cref="IRegistrationBase{TInterface}"/></returns>
public IRegistrationBase<T> WithFactoryMethod(Func<IIocContainer, T> factoryMethod) public ISingleTypeRegistration<T> WithFactoryMethod(Func<IIocContainer, T> factoryMethod)
{ {
FactoryMethod = factoryMethod; FactoryMethod = factoryMethod;
return this; return this;

Loading…
Cancel
Save