Struct SemanticId
Uniquely identifies a Symbol, safe for use as a dictionary key or set member.
public readonly record struct SemanticId : IEquatable<SemanticId>
- Implements
- Inherited Members
Remarks
Wraps a symbol's declaring Uri, comparing AbsoluteUri
ordinally instead of deferring to Uri's own Equals/GetHashCode:
those deliberately ignore Fragment, but a symbol's discriminating name and
location (module, member, nesting) is encoded entirely in the fragment — two distinct symbols
sharing a workspace root would otherwise compare equal.
Constructors
SemanticId(Uri)
Uniquely identifies a Symbol, safe for use as a dictionary key or set member.
public SemanticId(Uri Uri)
Parameters
Remarks
Wraps a symbol's declaring Uri, comparing AbsoluteUri
ordinally instead of deferring to Uri's own Equals/GetHashCode:
those deliberately ignore Fragment, but a symbol's discriminating name and
location (module, member, nesting) is encoded entirely in the fragment — two distinct symbols
sharing a workspace root would otherwise compare equal.
Properties
Uri
The identified symbol's Uri.
public Uri Uri { get; init; }
Property Value
Methods
Equals(SemanticId)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SemanticId other)
Parameters
otherSemanticIdAn object to compare with this object.
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.