public LeveledStringBuilder ToString(LeveledStringBuilder sb, bool withName = true) { if (withName) { sb.Append(DatasourceName); sb.Append(": "); } sb.Append(Stats); sb++; if (ErrorMessage != null) { sb.AppendLine().Append(ErrorMessage); } if (PostProcessorReports != null) { sb++; foreach (var ppr in PostProcessorReports) { sb.AppendLine(); ppr.ToString(sb); } sb--; } sb--; return(sb); }
public override string ToString() { var sb = new LeveledStringBuilder("-- ", " "); foreach (var ds in DatasourceReports) { ds.ToString(sb.OptAppendLine()); } if (UnknownSwitches != null) { sb.Append("Unknown switches: "); sb.Append(UnknownSwitches); sb.AppendLine(); } if (MentionedSwitches != null) { sb.Append("Unknown switches: "); sb.Append(MentionedSwitches); sb.AppendLine(); } return(sb.ToString()); }