Class ResolvedSourceSpan
Represents the original source coverage for a span in a parsed source document.
public sealed class ResolvedSourceSpan
- Inheritance
-
ResolvedSourceSpan
- Inherited Members
Remarks
A contiguous span in a mapped document may originate from several disjoint spans, and eventually from several source files. PrimarySpan is the single best span for classic diagnostic display, while OriginSpans preserves the complete original-source coverage for richer diagnostics.
Constructors
ResolvedSourceSpan(OriginalSourceSpan, IReadOnlyList<OriginalSourceSpan>)
Represents the original source coverage for a span in a parsed source document.
public ResolvedSourceSpan(OriginalSourceSpan primarySpan, IReadOnlyList<OriginalSourceSpan> originSpans)
Parameters
primarySpanOriginalSourceSpanThe primary span for classic diagnostic display.
originSpansIReadOnlyList<OriginalSourceSpan>All original source spans covered by the resolved span.
Remarks
A contiguous span in a mapped document may originate from several disjoint spans, and eventually from several source files. PrimarySpan is the single best span for classic diagnostic display, while OriginSpans preserves the complete original-source coverage for richer diagnostics.
Properties
OriginSpans
Gets all original source spans covered by the resolved span.
public IReadOnlyList<OriginalSourceSpan> OriginSpans { get; }
Property Value
- IReadOnlyList<OriginalSourceSpan>
The original source spans covered by the resolved span.
PrimarySpan
Gets the best single span for classic diagnostic display.
public OriginalSourceSpan PrimarySpan { get; }
Property Value
- OriginalSourceSpan
The primary original source span.