Esempio n. 1
0
        public static ZLMethodDesc[] GetProcDescs(ZLMethodInfo zmethod)
        {
            var markMethod           = zmethod.MarkMethod;
            var sharpMethod          = zmethod.SharpMethod;
            List <ZLMethodDesc> list = new List <ZLMethodDesc>();

            ZCodeAttribute[] attrs = AttributeUtil.GetAttributes <ZCodeAttribute>(markMethod);
            foreach (ZCodeAttribute attr in attrs)
            {
                ZCodeParser  parser       = new ZCodeParser(sharpMethod.DeclaringType, zmethod);
                ZLMethodDesc typeProcDesc = parser.Parser(attr.Code);
                list.Add(typeProcDesc);
            }
            return(list.ToArray());
        }
Esempio n. 2
0
 public ZLMethodDesc Parser(string code)
 {
     i           = 0;
     paramIndex  = 0;
     zmethodDesc = new ZLMethodDesc(this.zlmethod, code);
     Code        = code;
     while (i < Code.Length)
     {
         if (ch == '(')
         {
             parseBracket();
         }
         else
         {
             parseText();
         }
     }
     return(zmethodDesc);
 }