Class LocatedDiagnostic
- Namespace
- DialogueDown.Diagnostics
- Assembly
- DialogueDown.dll
The public, located view of one diagnostic: its Code, Severity,
Category, the fully rendered Message, the one-based
Start and End positions, and the half-open character range
[StartOffset, EndOffset) the diagnostic points at.
Line/column suit human display and editor (LSP) ranges; the offsets let a tool index the source
directly — a rendered underline or an editor selection. Consumers — the CLI errata renderer
today, the LSP and web overlays later — depend on this stable projection rather than the
compiler's internal diagnostic, whose types are free to evolve. Built by projecting a
DialogueDown.Diagnostics.Diagnostic through a DialogueDown.Diagnostics.LineMap: the message is composed once (invariant
culture) and the offsets are resolved to line/column, so every consumer shares identical text
and locations.
[Equatable]
public sealed record LocatedDiagnostic : IEquatable<LocatedDiagnostic>
- Inheritance
-
LocatedDiagnostic
- Implements
- Inherited Members
Constructors
- LocatedDiagnostic(string, DiagnosticSeverity, DiagnosticCategory, string, LinePosition, LinePosition, int, int)
The public, located view of one diagnostic: its Code, Severity, Category, the fully rendered Message, the one-based Start and End positions, and the half-open character range
[StartOffset, EndOffset)the diagnostic points at. Line/column suit human display and editor (LSP) ranges; the offsets let a tool index the source directly — a rendered underline or an editor selection. Consumers — the CLI errata renderer today, the LSP and web overlays later — depend on this stable projection rather than the compiler's internal diagnostic, whose types are free to evolve. Built by projecting a DialogueDown.Diagnostics.Diagnostic through a DialogueDown.Diagnostics.LineMap: the message is composed once (invariant culture) and the offsets are resolved to line/column, so every consumer shares identical text and locations.
Properties
- Fixes
Suggested repairs for this problem, with absolute source offsets, in preference order — empty when the compiler knows none. The first is the preferred, auto-applicable repair an automatic fixer applies; the rest are alternatives a writer chooses between. Excluded from equality for the same reason it is on the core diagnostic: the located view is identified by the problem it locates.
Methods
- Equals(LocatedDiagnostic?)
Indicates whether the current object is equal to another object of the same type.
- GetHashCode()
Serves as the default hash function.