/// <summary> /// Checks if the constraints are violated by the given input for the specified generic method parameter. /// /// This method must be supplied with a mapping for any dependent generic method type parameters which /// this one can be constrained to. For example for the signature "void Foo{T0, T1}(T0 x, T1 y) where T0 : T1". /// we cannot know if the constraints are violated unless we know what we have calculated T1 to be. /// </summary> private static bool ConstraintsViolated(Type inputType, Type genericMethodParameterType, Dictionary <Type, Type> binding) { return(ReflectionUtils.ConstraintsViolated(genericMethodParameterType, inputType, binding, false)); }