Class BoundSymbol
A Symbol that is bound to a workspace document Location.
public abstract record BoundSymbol : Symbol, IEquatable<Symbol>, IEquatable<BoundSymbol>
- Inheritance
-
BoundSymbol
- Implements
- Derived
- Inherited Members
Constructors
BoundSymbol(Uri, Uri, string, ScopeKind, SymbolKindExt, SourceRange, SourceRange)
A Symbol that is bound to a workspace document Location.
protected BoundSymbol(Uri WorkspaceRoot, Uri ParentUri, string Name, ScopeKind Scope, SymbolKindExt Kind, SourceRange Range, SourceRange SelectionRange)
Parameters
WorkspaceRootUriA
Urirepresenting the absolute path to the library or project workspace.ParentUriUriThe
Uriof the parent symbol.NamestringThe name of the symbol.
ScopeScopeKindThe allocation scope of this symbol.
KindSymbolKindExtA
SymbolKind(extensible) metadata value describing the kind of symbol.RangeSourceRangeThe entire document
Rangebelonging to this symbol.SelectionRangeSourceRangeThe specific document
Rangeto highlight when this symbol is selected, usually the symbol's identifier name if applicable.
Properties
AllDefinitions
Every declaration site of this symbol: Definitions when it is populated, otherwise a single synthesized Live site over Range. Use this when a caller needs to treat single- and multi-branch symbols uniformly.
public IEnumerable<SymbolDefinition> AllDefinitions { get; }
Property Value
Definitions
Every source site where this symbol is declared, in source order — populated only when the same name is declared in more than one conditional-compilation branch. Empty for the common single-declaration case, in which Range and SelectionRange are the sole site.
public ImmutableArray<SymbolDefinition> Definitions { get; init; }
Property Value
PrimaryRange
The primary declaration span — the first Live site, else the first site, else Range. LSP navigation targets the primary; when no precompiler-evaluation pass has run yet this is simply the first branch.
public SourceRange PrimaryRange { get; }
Property Value
PrimarySelectionRange
The primary selection span, chosen the same way as PrimaryRange.
public SourceRange PrimarySelectionRange { get; }
Property Value
Range
The entire document Range belonging to this symbol.
public SourceRange Range { get; init; }
Property Value
Scope
The allocation scope of this symbol.
public ScopeKind Scope { get; init; }
Property Value
SelectionRange
The specific document Range to highlight when this symbol is selected, usually the symbol's identifier name if applicable.
public SourceRange SelectionRange { get; init; }