public static MethodInfo GetExtensionGenericMethodInfo(string fullClassPath, string methodName, Type[] genericTypes, string dllName = null, params object[] sourceParameters) { return(ReflectionUtil.GetGenericMethodInfo(fullClassPath, methodName, genericTypes, BindingFlagsConst.All, () => GetExtensionMethodInfos(TypeUtil.GetType(fullClassPath, dllName)), dllName, sourceParameters)); }
public static MethodInfo GetGenericMethodInfo(Type type, string methodName, Type[] genericTypes, BindingFlags bindingFlags = BindingFlagsConst.All, Func <MethodInfo[]> getMethodInfosFunc = null, params object[] sourceParameters) { List <Type> sourceParameterTypeList = sourceParameters.ToList().ConvertAll(parameter => parameter?.GetType()); return(ReflectionUtil.GetGenericMethodInfo(type, methodName, genericTypes, bindingFlags, getMethodInfosFunc, sourceParameterTypeList.ToArray())); }
public static MethodInfo GetExtensionGenericMethodInfo(string fullClassPath, string methodName, Type[] genericTypes, Assembly assembly = null, params object[] sourceParameters) { Type type = null; type = assembly != null?assembly.GetType(fullClassPath) : TypeUtil.GetType(fullClassPath); return(type == null ? null : ReflectionUtil.GetGenericMethodInfo(fullClassPath, methodName, genericTypes, BindingFlagsConst.All, () => GetExtensionMethodInfos(type), assembly, sourceParameters)); }
public static MethodInfo GetExtensionGenericMethodInfo(Type type, string methodName, Type[] genericTypes, params object[] sourceParameters) { return(ReflectionUtil.GetGenericMethodInfo(type, methodName, genericTypes, BindingFlagsConst.All, () => GetExtensionMethodInfos(type), sourceParameters)); }
public static MethodInfo GetGenericMethodInfo(this Type self, string methodName, Type[] genericTypes, BindingFlags bindingFlags = BindingFlagsConst.All, params Type[] sourceParameterTypes) { return(ReflectionUtil.GetGenericMethodInfo(self, methodName, genericTypes, bindingFlags, null, sourceParameterTypes)); }