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); } } } } }
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)); } }
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); }
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); } } } }
public ZType GetMemberZType() { return(ZTypeManager.GetBySharpType(SharpField.FieldType) as ZType); }