예제 #1
0
 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));
 }
예제 #2
0
        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()));
        }
예제 #3
0
        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));
        }
예제 #4
0
 public static MethodInfo GetExtensionMethodInfo(Type type, string methodName,
                                                 params object[] sourceParameters)
 {
     return(ReflectionUtil.GetMethodInfo(type, methodName, BindingFlagsConst.All,
                                         () => GetExtensionMethodInfos(type), sourceParameters));
 }
예제 #5
0
 public static MethodInfo GetMethodInfo(this Type self, string methodName,
                                        BindingFlags bindingFlags = BindingFlagsConst.All, params Type[] sourceParameterTypes)
 {
     return(ReflectionUtil.GetMethodInfo(self, methodName, bindingFlags, null, sourceParameterTypes));
 }