IsExtensionMethod() публичный статический Метод

public static IsExtensionMethod ( MemberInfo method ) : bool
method MemberInfo
Результат bool
Пример #1
0
 public void LoadExtension(Type type)
 {
     if ((type != null) && Util.IsExtensionType(type))
     {
         foreach (MethodInfo info in type.GetMethods(BindingFlags.FlattenHierarchy | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance))
         {
             if (Util.IsExtensionMethod(info))
             {
                 this.GetScorpioType(info.GetParameters()[0].ParameterType).AddExtensionMethod(info);
             }
         }
     }
 }
Пример #2
0
        public void LoadExtension(Type type)
        {
            if (type == null)
            {
                return;
            }
            if (!Util.IsExtensionType(type))
            {
                return;
            }
            var methods = type.GetMethods(BindingFlag);

            foreach (var method in methods)
            {
                if (Util.IsExtensionMethod(method))
                {
                    GetScorpioType(method.GetParameters()[0].ParameterType).AddExtensionMethod(method);
                }
            }
        }