Class ValidationMessage
- Namespace
- Tlumach.Validation
- Assembly
- Tlumach.dll
One problem found by TranslationValidator.
public sealed class ValidationMessage
- Inheritance
-
ValidationMessage
- Inherited Members
Constructors
ValidationMessage(ValidationSeverity, string, string, string?, int, int)
Initializes a new instance of the ValidationMessage class.
public ValidationMessage(ValidationSeverity severity, string code, string message, string? filePath, int line = 0, int column = 0)
Parameters
severityValidationSeverityThe severity.
codestringThe code of the check (one of ValidationCodes).
messagestringThe text of the message.
filePathstringThe full path of the file that the message is about, if any.
lineintThe 1-based line in
filePath, or 0 when unknown.columnintThe 1-based column in
filePath, or 0 when unknown.
Properties
Code
Gets the code of the check (one of ValidationCodes).
public string Code { get; }
Property Value
Column
Gets the 1-based column in FilePath, or 0 when the column is unknown.
public int Column { get; }
Property Value
FilePath
Gets the full path of the file that the message is about, or null.
public string? FilePath { get; }
Property Value
Line
Gets the 1-based line in FilePath, or 0 when the line is unknown.
public int Line { get; }
Property Value
Message
Gets the text of the message.
public string Message { get; }
Property Value
Severity
Gets the severity.
public ValidationSeverity Severity { get; }
Property Value
Methods
ToString()
Formats the message the way compilers do, which lets Visual Studio and VS Code turn the line in an output window into a link: path(line,column): error CODE: text.
public override string ToString()
Returns
- string
The formatted message.