Docs · API reference · Verso.Abstractions

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#

System.String

EndColumn Property#

The zero-based column number where the diagnostic span ends.

public int EndColumn { get; init; }

Property Value#

System.Int32

EndLine Property#

The zero-based line number where the diagnostic span ends.

public int EndLine { get; init; }

Property Value#

System.Int32

Message Property#

A human-readable description of the issue.

public string Message { get; init; }

Property Value#

System.String

Severity Property#

The severity level of the diagnostic.

public Verso.Abstractions.DiagnosticSeverity Severity { get; init; }

Property Value#

DiagnosticSeverity

StartColumn Property#

The zero-based column number where the diagnostic span begins.

public int StartColumn { get; init; }

Property Value#

System.Int32

StartLine Property#

The zero-based line number where the diagnostic span begins.

public int StartLine { get; init; }

Property Value#

System.Int32