예제 #1
0
 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));
 }
예제 #2
0
        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()));
        }
예제 #3
0
        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));
        }
예제 #4
0
 public static MethodInfo GetExtensionGenericMethodInfo(Type type, string methodName, Type[] genericTypes,
                                                        params object[] sourceParameters)
 {
     return(ReflectionUtil.GetGenericMethodInfo(type, methodName, genericTypes, BindingFlagsConst.All,
                                                () => GetExtensionMethodInfos(type), sourceParameters));
 }
예제 #5
0
 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));
 }