public void PrintAllOutcomes(Report report) { foreach (Outcome outcome in report.Outcomes) { string i = indent(outcome.Nesting); switch (outcome.Kind) { case Kind.Start: WriteLine(i + string.Format("<u>{0}</u> {1} ({2})", outcome.Type, outcome.Vector.Element.Name, outcome.Vector.Node.Name)); WriteLine(i + "{{"); break; case Kind.End: WriteLine(i + "}}"); break; default: WriteLine(i + OutcomeToString(outcome)); break; } } }
public void Print(Report report, ReportMode mode) { if (mode == ReportMode.Full) PrintFull(report); else PrintSummary(report); }
public void PrintFull(Report report) { WriteLine("<div>"); PrintAllOutcomes(report); WriteLine("</div>"); }
public void PrintSummary(Report report) { if (report.Valid) { WriteLine("<div>"); WriteLine("Resource is valid"); WriteLine("</div>"); return; } else { WriteLine("<div>"); PrintFailedOutcomes(report); WriteLine("</div>"); } }
public void PrintFailedOutcomes(Report report) { foreach (Outcome outcome in report.Outcomes) { if (outcome.Kind.Failed()) { WriteOutcome(outcome); } } }