public static MethodInfo GetExtensionMethodInfo2(Type type, string methodName) { return(ReflectionUtil.GetMethodInfo2(type, methodName, BindingFlagsConst.All, () => { var methodInfos = GetExtensionMethodInfos(type); if (methodInfos.IsNullOrEmpty()) { return null; } for (var i = 0; i < methodInfos.Length; i++) { var methodInfo = methodInfos[i]; if (methodInfo.Name.Equals(methodName)) { return methodInfo; } } return null; })); }
public static MethodInfo GetMethodInfo2(this Type self, string methodName, BindingFlags bindingFlags = BindingFlagsConst.All) { return(ReflectionUtil.GetMethodInfo2(self, methodName, bindingFlags)); }