public virtual FDumpInfo Dump(FDumpInfo info) { RDump.StartDump(info); FBytes bytes = Build(); info.Append("Length:"); info.AppendLine(bytes.Length); info.AppendLine(RDump.LINE_L2); string value = Encoding.ASCII.GetString(bytes.Memory, 0, bytes.Length); char[] chs = value.ToCharArray(); int count = Math.Min(chs.Length, 2048); for (int n = 0; n < count; n++) { char ch = chs[n]; if (ch >= ' ') { info.Append(ch); } else if (ch == '\n' || ch == '\r') { info.Append(ch); } else { info.Append('.'); } } info.AppendLine(); info.AppendLine(RDump.LINE_L2); return(info); }
//============================================================ // <T>获得调试转储信息。</T> // // @param info 转储信息 // @return 转储信息 //============================================================ public virtual FDumpInfo Dump(FDumpInfo info) { info.Begin(); info.Append(" count=", _count); // 追加所有项目 info.Append("{"); for (int n = 0; n < _count; n++) { // 追加分隔符 if (n > 0) { info.Append(", "); } // 追加内容 T value = _items[n]; if (value is IDump) { ((IDump)value).Dump(info); } else { info.Append(value); } } info.Append("{"); info.End(); return(info); }
public virtual FDumpInfo Dump(FDumpInfo info) { RDump.StartDump(info); info.Append("[", _start.ToString("yyMMdd-hhmmss")); info.Append(" - ", _end.ToString("yyMMdd-hhmmss")); info.Append("] = ", GetDiff().ToString(), "s"); return(info); }
public static string GetReturnInfo(IMethodReturnMessage result) { FDumpInfo info = new FDumpInfo(); info.Append("Result["); info.AppendDump(result.ReturnValue); info.Append("]"); return(info.ToString()); }
public virtual FDumpInfo Dump(FDumpInfo info) { RDump.StartDump(info); info.Append(_address.ToString("X8")); info.Append(' '); info.Append(MakeData().PadRight(20, ' ')); info.Append(_code.Name.PadRight(8, ' ').ToUpper()); info.Append(MakeParameters()); return(info); }
public virtual FDumpInfo Dump(FDumpInfo info) { RDump.StartDump(info); info.Append("{ "); info.AppendProperty("id", _id, true); info.AppendProperty("name", _name, true); info.AppendProperty("size", _size, true); info.AppendProperty("description", _description, false); info.Append(" }"); return(info); }
public static string GetCallerInfo(IMethodCallMessage caller) { FDumpInfo info = new FDumpInfo(); // Args info.Append("Args["); object[] args = caller.Args; if (args != null) { int count = args.Length; for (int n = 0; n < count; n++) { if (n > 0) { info.Append(','); } info.AppendDump(args[n]); } } info.Append("]"); return(info.ToString()); }
//============================================================ // <T>获得调试转储信息。</T> // // @param info 转储信息 // @return 转储信息 //============================================================ public virtual FDumpInfo Dump(FDumpInfo info) { info.Begin(); info.Append("count=" + _count); // 追加所有项目 info.Append(" {"); bool isFirst = true; FListEntry <T> entry = _first; while (null != entry) { // 追加分隔符 if (isFirst) { isFirst = false; } else { info.Append(", "); } // 追加内容 T value = entry.value; if (value is IDump) { ((IDump)value).Dump(info); } else { info.Append(value); } entry = entry.next; } info.Append("}"); info.End(); return(info); }
//============================================================ // <T>获得调试转储信息。</T> // // @param info 转储信息 // @return 转储信息 //============================================================ public override FDumpInfo Dump(FDumpInfo info) { RDump.StartDump(info); FXmlNode parent = (FXmlNode)info.Instance; // 转存名称 info.Append(parent.Name); // 转存属性列表 if (parent.HasAttribute()) { info.Append(" ["); foreach (IPair <string, string> pair in parent.Attributes) { if (!pair.IsFirst()) { info.Append(", "); } info.Append(pair.Name, "=", pair.Value); } info.Append("]"); } // 转存内容 if (parent.HasText()) { info.Append("{"); info.Append(parent.Text); info.Append("}"); } // 转存元素列表 if (parent.HasElement()) { info.AppendLine(); foreach (FXmlElement element in parent.Elements) { info.IncreaseDeep(element); Dump(info); info.DecreaseDeep(); } } return(info); }
public override FDumpInfo Dump(FDumpInfo info) { RDump.StartDump(info); info.AppendProperty(PTY_ID, _id, true); info.AppendProperty(PTY_FACE, _faceName, true); info.AppendProperty(PTY_TYPE, _typeName, true); info.AppendProperty(PTY_SCOPE, _scope, true); // Get max id length int idlength = 0; if (!_initializes.IsEmpty() || _releases.IsEmpty()) { // Initialize max id length for (int n = 0; n < _initializes.Count; n++) { idlength = Math.Max(idlength, RString.Nvl(_initializes[n].Id).Length); } // Release max id length for (int n = 0; n < _releases.Count; n++) { idlength = Math.Max(idlength, RString.Nvl(_releases[n].Id).Length); } } // Initializes if (!_initializes.IsEmpty()) { for (int n = 0; n < _initializes.Count; n++) { info.AppendLine(); RDump.AppendSpace(info, info.Deep + 1); info.Append("Initialize: "); info.Append(RString.Nvl(_initializes[n].Id).PadRight(idlength)); info.Append(" = "); _initializes[n].Dump(info); } } // Releases if (!_releases.IsEmpty()) { for (int n = 0; n < _releases.Count; n++) { info.AppendLine(); RDump.AppendSpace(info, info.Deep + 1); info.Append("Release: "); info.Append(RString.Nvl(_releases[n].Id).PadRight(idlength)); info.Append(" = "); _releases[n].Dump(info); } } return(info); }
public override FDumpInfo Dump(FDumpInfo info) { info.Append(this); return(info); }
public FDumpInfo Dump(FDumpInfo info) { info.Append(" Path=", FullPath); info.Append(" UserName=", _userName); return(info); }