Table of Contents

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

count int

The number.

singular string

The noun in the singular.

plural string

The 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

writer TextWriter

The writer.

report ProjectValidationReport

The report.

note string

An optional note about how the files of the project were found.

formatMessage Func<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

writer TextWriter

The writer.

reports IReadOnlyCollection<ProjectValidationReport>

The reports of the projects.