Esempio n. 1
0
        private static List <OrderAttrMethod> FindAllMethod(Type type)
        {
            var types = GetAllSubTypesInScripts();
            var ret   = new List <OrderAttrMethod>();

            foreach (var mono in types)
            {
                MethodInfo[] methods = mono.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
                foreach (MethodInfo method in methods)
                {
                    if (method.IsDefined(type, false))
                    {
                        OrderableAttr attr = (OrderableAttr)(method.GetCustomAttributes(type, true)[0]);
                        ret.Add(new OrderAttrMethod(attr, method));
                    }
                }
            }
            return(ret);
        }
Esempio n. 2
0
 public OrderAttrMethod(OrderableAttr attr, MethodInfo method)
 {
     this.method = method;
     this.attr   = attr;
 }