Class ValidationReportWriter
- Namespace
- Tlumach.Validation
- Assembly
- Tlumach.dll
Writes a validation report as text for the output windows of the IDEs. The IDEs turn different forms of a location into a link, so the form of a message is given by the caller.
public static class ValidationReportWriter
- Inheritance
-
ValidationReportWriter
- Inherited Members
Methods
Plural(int, string, string?)
Builds a phrase with a number and a noun in the right form, such as "1 file" or "2 files".
public static string Plural(int count, string singular, string? plural = null)
Parameters
countintThe number.
singularstringThe noun in the singular.
pluralstringThe noun in the plural, when it is not the singular with "s".
Returns
- string
The phrase.
WriteText(TextWriter, ProjectValidationReport, string?, Func<ValidationMessage, string>)
Writes the report of a project.
public static void WriteText(TextWriter writer, ProjectValidationReport report, string? note, Func<ValidationMessage, string> formatMessage)
Parameters
writerTextWriterThe writer.
reportProjectValidationReportThe report.
notestringAn optional note about how the files of the project were found.
formatMessageFunc<ValidationMessage, string>Formats a message, including its location.
WriteTotals(TextWriter, IReadOnlyCollection<ProjectValidationReport>)
Writes the totals of several projects.
public static void WriteTotals(TextWriter writer, IReadOnlyCollection<ProjectValidationReport> reports)
Parameters
writerTextWriterThe writer.
reportsIReadOnlyCollection<ProjectValidationReport>The reports of the projects.