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 ZType SearchZTypeOne(string zname) { ZType ztype = null; ztype = EnumerableHelper.SearchOne <ZEnumType>(EnumTypes, (ZEnumType zenum) => zenum.ZName == zname); if (ztype == null) { ztype = EnumerableHelper.SearchOne <ZClassType>(ClassTypes, (ZClassType zclass) => zclass.ZName == zname); } return(ztype); }
public bool ZEquals(ZType zclass) { if (zclass is ZLEnumInfo) { ZLEnumInfo z2 = (zclass as ZLEnumInfo); if (z2.SharpType == this.SharpType) { return(true); } } return(false); }
public ZType[] SearchZType(string zname) { ZType ztype = SearchZTypeOne(zname); if (ztype == null) { return(new ZType[] { }); } else { return(new ZType[] { ztype }); } //List<ZType> ztypes = new List<ZType>(); //ztypes.AddRange( ZTypeListHelper.Search(zname, EnumTypes.ToArray())); //ztypes.AddRange(ZTypeListHelper.Search(zname, ClassTypes.ToArray())); //return ztypes.ToArray(); }
public WordInfo SearchWord(string text) { if (!ContainsWord(text)) { return(null); } ZType ztype = SearchZTypeOne(text); WordInfo info0 = null; if (ztype != null) { info0 = new WordInfo(text, WordKind.TypeName, ztype); } WordInfo info1 = IWordDictionaryHelper.EnumerableSearchWord(text, EnumTypes); WordInfo info2 = IWordDictionaryHelper.EnumerableSearchWord(text, ClassTypes); WordInfo newWord = WordInfo.Merge(info0, info1, info2); return(newWord); }
// public string ArgName { get; protected set; } public ZMethodNormalArg(string argName, ZType argType) { ArgZType = argType; ArgName = argName; }
//public string ArgName { get; protected set; } public ZMethodGenericArg(string argName, ZType argBaseType) { ArgName = argName; ArgBaseZType = argBaseType; }
public static ZType RegNewGenericType(Type newType) { ZType ztype = CreateZTypeImp(newType) as ZType; return(ztype); }
//public object Data { get; set; } public ZCallValueArg(ZType argZType) { ValueZType = argZType; }
//public object Data { get; set; } public ZCallGenericArg(ZType argZType) { BaseZType = argZType; }
public ZArgCall(string name, ZType ztype) { ZArgName = name; ZArgType = ztype; }
public ZCLocalVar(string name, ZType type, bool isAutoGenerated) { this.ZName = name; ZType = type; IsAutoGenerated = isAutoGenerated; }
public ZCLocalVar(string name, ZType type) { this.ZName = name; ZType = type; }