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); } } } } }
protected ZPackageInfo GetZPackageDesc(string packageName) { if (PackageDescTable.ContainsKey(packageName)) { return(PackageDescTable[packageName]); } else { ZPackageInfo zpackage = new ZPackageInfo(packageName); PackageDescTable.Add(packageName, zpackage); return(zpackage); } }