Beispiel #1
0
        protected void InitPackageDescTable()
        {
            _PackageDescTable = new Dictionary <string, ZPackageInfo>();

            var refTypes = ZAssembly.GetTypes();

            foreach (var type in refTypes)
            {
                if (type.IsPublic)
                {
                    string packageName = type.Namespace;
                    packageName = packageName.Replace('.', '/');
                    ZPackageInfo zpackage = GetZPackageDesc(packageName);
                    var          descType = ZTypeManager.GetByMarkType(type);
                    if (descType != null)
                    {
                        zpackage.AddZDescType(descType);
                    }
                    else
                    {
                        var zdim = ZTypeManager.CreateZLDimImp(type);
                        if (zdim != null)
                        {
                            zpackage.AddZDimType(zdim);
                        }
                    }
                }
            }
        }
Beispiel #2
0
 private ZType GetZTypeByTypeName(string typeName)
 {
     if (!IsGenericTypName(typeName))
     {
         var ztypes = ZTypeManager.GetByMarkName(typeName);
         if (ztypes.Length == 0)
         {
             ztypes = ZTypeManager.GetBySharpName(typeName);
         }
         if (ztypes.Length > 0)
         {
             ZType ztype = ztypes[0] as ZType;
             //arg = new ZMethodArg(typeName, ztype);
             return(ztype);
         }
         else
         {
         }
         return(null);
     }
     else
     {
         string shortClassName = GetGenericTypNameShortName(typeName);
         return(GetZTypeByTypeName(shortClassName));
     }
 }
Beispiel #3
0
        public static ZConstructorDesc CreateZConstructorDesc(ConstructorInfo ci)
        {
            List <ZMethodNormalArg> args = new List <ZMethodNormalArg>();

            foreach (ParameterInfo param in ci.GetParameters())
            {
                ZMethodNormalArg arg = new ZMethodNormalArg(param.Name, ZTypeManager.GetBySharpType(param.ParameterType) as ZType);
                args.Add(arg);
            }
            ZConstructorDesc desc = new ZConstructorDesc(args);

            desc.Constructor = ci;
            return(desc);
        }
Beispiel #4
0
        protected void InitPackageDescTable()
        {
            _PackageDescTable = new Dictionary <string, ZPackageDesc>();

            var refTypes = ZAssembly.GetTypes();

            foreach (var type in refTypes)
            {
                if (type.IsPublic)
                {
                    string       packageName = type.Namespace;
                    ZPackageDesc zpackage    = GetZPackageDesc(packageName);

                    IZDescType descType = ZTypeManager.GetByMarkType(type);
                    if (descType != null)
                    {
                        zpackage.AddZDescType(descType);
                    }
                }
            }
        }
Beispiel #5
0
 public ZType GetMemberZType()
 {
     return(ZTypeManager.GetBySharpType(SharpField.FieldType) as ZType);
 }