예제 #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());
        }
예제 #2
0
        protected ZMethodDesc[] GetProcDesc(MethodInfo markMethod, MethodInfo sharpMethod)
        {
            List <ZMethodDesc> list = new List <ZMethodDesc>();

            ZCodeAttribute[] attrs = AttributeUtil.GetAttributes <ZCodeAttribute>(markMethod);
            foreach (ZCodeAttribute attr in attrs)
            {
                //if (markMethod.Name == "SetTitle")
                //{
                //    Console.WriteLine("ZMethodInfo.SetTitle");
                //}
                ZCodeParser parser       = new ZCodeParser(sharpMethod.DeclaringType, sharpMethod);
                ZMethodDesc typeProcDesc = parser.Parser(attr.Code);
                typeProcDesc.ZMethod = this;
                //ZMethodInfo exMethod = ZTypeUtil.CreatExMethodInfo(method, this.SharpType);
                //typeProcDesc.ExMethod = exMethod;
                list.Add(typeProcDesc);
            }
            return(list.ToArray());
        }