コード例 #1
0
 public string[] GetZNames()
 {
     if (_znames == null)
     {
         _znames = ZClassUtil.GetZNames(MarkField);
     }
     return(_znames);
 }
コード例 #2
0
 public ZLMethodInfo(MethodInfo markMethod, MethodInfo sharpMethod, ZLClassInfo zclass)
 {
     ZClass               = zclass;
     MarkMethod           = markMethod;
     SharpMethod          = sharpMethod;
     AccessAttr           = ZClassUtil.GetAccessAttributeEnum(sharpMethod);
     GenericParameterDict = GenericUtil.GetMethodGenericParameters(sharpMethod);
     //Init();
 }
コード例 #3
0
 protected void Init()
 {
     ZDesc = ZClassUtil.CreateZConstructorDesc(Constructor, this, this.ZClass);
     //if(ZDesc==null)
     //{
     //    Console.WriteLine("ZLConstructorInfo Init ZDesc==null");
     //}
     //else if (ZDesc.ZBracketDesc == null)
     //{
     //    Console.WriteLine("ZLConstructorInfo Init ZDesc.ZBracketDesc==null");
     //}
     AccessAttr = ZClassUtil.GetAccessAttributeEnum(Constructor);
     IsStatic   = Constructor.IsStatic;
 }
コード例 #4
0
ファイル: ZLEnumInfo.cs プロジェクト: pyzh/ZLanguage3
        protected ZLEnumItemInfo[] GetEnumElements(Type defType, Type sharpType)
        {
            List <ZLEnumItemInfo> flist = new List <ZLEnumItemInfo>();

            FieldInfo[] fields = ZClassUtil.GetEnumItems(defType);
            foreach (FieldInfo field in fields)
            {
                if (AttributeUtil.HasAttribute <ZCodeAttribute>(field))
                {
                    FieldInfo      sharpField = this.SharpType.GetField(field.Name);
                    ZLEnumItemInfo exField    = new ZLEnumItemInfo(this, field, sharpField);
                    flist.Add(exField);
                }
            }
            return(flist.ToArray());
        }