Closed SimonG96 closed 5 years ago
If an interface type is expected as a constructor parameter, but the given argument is of the type of the implementation, in the function ResolveConstructorArguments() the parameter can't be assigned to the correct parameter.
ResolveConstructorArguments()
This happens because we only check for
fittingArgument = argumentsList.FirstOrGiven<object, InternalResolvePlaceholder>(a => a?.GetType() == parameter.ParameterType);
We also have to check for
parameter.ParameterType.IsInstanceOfType(a)
If an interface type is expected as a constructor parameter, but the given argument is of the type of the implementation, in the function
ResolveConstructorArguments()
the parameter can't be assigned to the correct parameter.This happens because we only check for
We also have to check for