public override void ToTextCode(IdToNameMap nameMap, StringBuilder result, int indent = 0) { string strForUBound; if (UBound.Length == 0) { strForUBound = ""; } else if (UBound.Length == 1 && UBound[0] == 0) { strForUBound = "\"0\""; } else { strForUBound = "\"" + string.Join(",", UBound.Select(x => x == 0 ? "" : x.ToString())) + "\""; } TextCodeUtils.WriteDefinedCode(result, indent, "程序集变量", nameMap.GetUserDefinedName(Id), nameMap.GetDataTypeName(DataType), "", strForUBound, Comment); }
public void ToTextCode(IdToNameMap nameMap, StringBuilder result, int indent, bool writeMethod, bool writeCode = true) { if (GlobalVariables != null && GlobalVariables.Length != 0) { TextCodeUtils.WriteJoinCode(GlobalVariables, Environment.NewLine, nameMap, result, indent); result.AppendLine(); } TextCodeUtils.WriteJoinCode(Classes, Environment.NewLine, writeMethod ? this : null, nameMap, result, indent, writeCode); if (DllDeclares != null && DllDeclares.Length != 0) { result.AppendLine(); TextCodeUtils.WriteJoinCode(DllDeclares, Environment.NewLine, nameMap, result, indent); } if (Structs != null && Structs.Length != 0) { result.AppendLine(); TextCodeUtils.WriteJoinCode(Structs, Environment.NewLine, nameMap, result, indent); } }
public void ToTextCode(IdToNameMap nameMap, StringBuilder result, int indent = 0) { TextCodeUtils.WriteJoinCode(Constants, Environment.NewLine, nameMap, result, indent); }