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