Diagnostic Class#
Represents a code diagnostic (error, warning, or informational message) reported by a kernel's language service.
public sealed record Diagnostic : System.IEquatable<Verso.Abstractions.Diagnostic>
Inheritance System.Object → Diagnostic
Implements System.IEquatable<Diagnostic>
Constructors#
Diagnostic(DiagnosticSeverity, string, int, int, int, int, string) Constructor#
Represents a code diagnostic (error, warning, or informational message) reported by a kernel's language service.
public Diagnostic(Verso.Abstractions.DiagnosticSeverity Severity, string Message, int StartLine, int StartColumn, int EndLine, int EndColumn, string? Code=null);
Parameters#
Severity DiagnosticSeverity
The severity level of the diagnostic.
Message System.String
A human-readable description of the issue.
StartLine System.Int32
The zero-based line number where the diagnostic span begins.
StartColumn System.Int32
The zero-based column number where the diagnostic span begins.
EndLine System.Int32
The zero-based line number where the diagnostic span ends.
EndColumn System.Int32
The zero-based column number where the diagnostic span ends.
Code System.String
An optional diagnostic code or identifier (e.g. "CS1002").
Properties#
Code Property#
An optional diagnostic code or identifier (e.g. "CS1002").
public string? Code { get; init; }
Property Value#
EndColumn Property#
The zero-based column number where the diagnostic span ends.
public int EndColumn { get; init; }
Property Value#
EndLine Property#
The zero-based line number where the diagnostic span ends.
public int EndLine { get; init; }
Property Value#
Message Property#
A human-readable description of the issue.
public string Message { get; init; }
Property Value#
Severity Property#
The severity level of the diagnostic.
public Verso.Abstractions.DiagnosticSeverity Severity { get; init; }
Property Value#
StartColumn Property#
The zero-based column number where the diagnostic span begins.
public int StartColumn { get; init; }
Property Value#
StartLine Property#
The zero-based line number where the diagnostic span begins.
public int StartLine { get; init; }