- check if create method returns same type as registration

ImplementExpressionTrees v4.0.0-beta8
Simon G 3 years ago
parent a163e19c1e
commit ad07c85255
  1. 2
      LightweightIocContainer.Validation/IocValidator.cs

@ -48,7 +48,7 @@ public class IocValidator
if (registration is IWithFactoryInternal { Factory: { } } withFactoryRegistration)
{
(from createMethod in withFactoryRegistration.Factory.CreateMethods
(from createMethod in withFactoryRegistration.Factory.CreateMethods.Where(m => m.ReturnType == registration.InterfaceType)
select createMethod.GetParameters().Select(p => p.ParameterType)
into parameterTypes
select (from parameterType in parameterTypes

Loading…
Cancel
Save