public static bool IsValidConverterTo(this IConverterProvider provider, Delegate dlg, Type outputType) { Contract.Requires(provider != null && outputType != null); if (dlg == null) { return false; } MethodInfo method = dlg.GetInvokeMethod(); if (method.ReturnType != outputType) { return false; } ParameterInfo[] parameters = method.GetParametersNoCopy(); return parameters.Length == 1 && parameters[0].ParameterType == provider.OriginType; }