Exemple #1
0
 public static void InvokeExtension(object obj, string methodName, bool isMissNotInvoke = true,
                                    params object[] parameters)
 {
     InvokeExtension(obj, ReflectionUtil.GetReflectionType(obj).FullName, methodName, isMissNotInvoke,
                     ReflectionUtil.GetReflectionType(obj).Assembly.FullName, parameters);
 }
Exemple #2
0
 public static MethodInfo GetExtensionMethodInfo(Type type, string methodName,
                                                 params object[] sourceParameters)
 {
     return(ReflectionUtil.GetMethodInfo(type, methodName, BindingFlagsConst.All,
                                         () => GetExtensionMethodInfos(type), sourceParameters));
 }
Exemple #3
0
 public static T Invoke <T>(object obj, string methodName, bool isMissNotInvoke = true,
                            params object[] parameters)
 {
     return(Invoke <T>(obj, ReflectionUtil.GetReflectionType(obj).FullName, methodName, isMissNotInvoke,
                       parameters));
 }
Exemple #4
0
 public static MethodInfo GetMethodInfo2(this Type self, string methodName,
                                         BindingFlags bindingFlags = BindingFlagsConst.All)
 {
     return(ReflectionUtil.GetMethodInfo2(self, methodName, bindingFlags));
 }
Exemple #5
0
 public static FieldInfo GetFieldInfo(this Type self, string fieldName,
                                      BindingFlags bindingFlags = BindingFlagsConst.All)
 {
     return(ReflectionUtil.GetFieldInfo(self, fieldName, bindingFlags));
 }
Exemple #6
0
 public static PropertyInfo GetPropertyInfo(this Type self, string propertyName,
                                            BindingFlags bindingFlags = BindingFlagsConst.All)
 {
     return(ReflectionUtil.GetPropertyInfo(self, propertyName, bindingFlags));
 }
Exemple #7
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));
 }