public static string ProcessingErrorsReport(this RunSummary runSummary) { if (!runSummary.HasProcessingErrors()) { return("No errors occurred while processing log set"); } var sb = new StringBuilder(); var errorsCollector = runSummary.ProcessingNotificationsCollector; sb.AppendLine($"{errorsCollector.TotalErrorsReported} errors occurred while processing log set:"); if (errorsCollector.TotalErrorsReported > errorsCollector.MaxErrorsWithDetails) { sb.AppendLine(); AddErrorsCountByReporterToStringBuilder(errorsCollector, sb); sb.AppendLine(); sb.AppendLine($"Details on first {errorsCollector.MaxErrorsWithDetails} reported errors:"); AppendDetailedErrorsToStringBuilder(errorsCollector, sb); } else { sb.AppendLine("Details of all reported errors:"); AppendDetailedErrorsToStringBuilder(errorsCollector, sb); } return(sb.ToString()); }