public string Print(BugFormatter formatter) { StringBuilder errorMessage = new StringBuilder(); if (formatter.HasHeaderFooter()) { errorMessage.AppendLine(formatter.PrintHeader()); } errorMessage.AppendLine(formatter.PrintLine("description", "")); errorMessage.AppendLine(formatter.PrintLine("workaround", "")); errorMessage.AppendLine("--------------------------"); errorMessage.Append("<table>"); errorMessage.Append(StackTrace); errorMessage.AppendLine("</table>"); if (!string.IsNullOrEmpty(ApiExtra)) { errorMessage.AppendLine(ApiExtra); } if (formatter is WikiBugFormatter) { errorMessage.AppendLine("~~~~"); } if (!string.IsNullOrEmpty(Thread)) { errorMessage.AppendLine(formatter.PrintLine("thread", Thread)); } errorMessage.AppendLine(formatter.PrintLine("OS", OS)); errorMessage.AppendLine(formatter.PrintLine("version", Version)); errorMessage.AppendLine(formatter.PrintLine("net", DotNetVersion)); errorMessage.AppendLine(formatter.PrintLine("duplicate", Duplicate)); if (!string.IsNullOrEmpty(Variables.URL)) { errorMessage.AppendLine(formatter.PrintLine("site", Variables.URL)); } if (!string.IsNullOrEmpty(AppendedInfo)) { errorMessage.AppendLine(AppendedInfo); } if (formatter.HasHeaderFooter()) { errorMessage.AppendLine(formatter.PrintFooter()); } return(errorMessage.ToString()); }
public string Print(BugFormatter formatter) { StringBuilder errorMessage = new StringBuilder(); if (formatter.HasHeaderFooter()) { errorMessage.AppendLine(formatter.PrintHeader()); } errorMessage.AppendLine(formatter.PrintLine("description", "")); errorMessage.AppendLine(formatter.PrintLine("workaround", "")); errorMessage.AppendLine("--------------------------"); errorMessage.Append("<table>"); errorMessage.Append(StackTrace); errorMessage.AppendLine("</table>"); if (!string.IsNullOrEmpty(ApiExtra)) { errorMessage.AppendLine(ApiExtra); } if (formatter is WikiBugFormatter) { errorMessage.AppendLine("~~~~"); } if (!string.IsNullOrEmpty(Thread)) { errorMessage.AppendLine(formatter.PrintLine("thread", Thread)); } errorMessage.AppendLine(formatter.PrintLine("OS", OS)); errorMessage.AppendLine(formatter.PrintLine("version", Version)); errorMessage.AppendLine(formatter.PrintLine("net", DotNetVersion)); errorMessage.AppendLine(formatter.PrintLine("duplicate", Duplicate)); //if (!string.IsNullOrEmpty(Variables.URL)) //{ // errorMessage.AppendLine(formatter.PrintLine("site", Variables.URL)); //} if (!string.IsNullOrEmpty(AppendedInfo)) { errorMessage.AppendLine(AppendedInfo); } if (formatter.HasHeaderFooter()) { errorMessage.AppendLine(formatter.PrintFooter()); } return errorMessage.ToString(); }