Class DeclarationFact
What the static pass found out about a declaration.
public sealed record DeclarationFact : IEquatable<DeclarationFact>
- Inheritance
-
DeclarationFact
- Implements
- Inherited Members
Remarks
A fact is stated only when it is true. What refers to a declaration that is accessible from outside the module, or that is called by convention or through the object it is a member of rather than by an expression that names it (an event handler, a member that implements an interface), is not all in the code the pass analyzed, and its references are not counted: References is then null, which says the references are not known and not that there are none.
Constructors
DeclarationFact(SemanticId, string, DeclarationKind, AccessModifier, bool, SourceLocation, DeclarationReferences?)
What the static pass found out about a declaration.
public DeclarationFact(SemanticId Symbol, string Name, DeclarationKind Kind, AccessModifier Access, bool IsImplicit, SourceLocation Location, DeclarationReferences? References)
Parameters
SymbolSemanticIdThe identity of the declared symbol.
NamestringThe name it is declared with.
KindDeclarationKindWhat it declares.
AccessAccessModifierWho can refer to it besides the module's own code.
IsImplicitboolWhether it was never declared: it came into being because something referred to it, which is legal and worth reporting.
LocationSourceLocationWhere it is declared.
ReferencesDeclarationReferences?Every reference to it, when every reference to it is in the code that was analyzed and was analyzed completely; null otherwise.
Remarks
A fact is stated only when it is true. What refers to a declaration that is accessible from outside the module, or that is called by convention or through the object it is a member of rather than by an expression that names it (an event handler, a member that implements an interface), is not all in the code the pass analyzed, and its references are not counted: References is then null, which says the references are not known and not that there are none.
Properties
Access
Who can refer to it besides the module's own code.
public AccessModifier Access { get; init; }
Property Value
IsImplicit
Whether it was never declared: it came into being because something referred to it, which is legal and worth reporting.
public bool IsImplicit { get; init; }
Property Value
Kind
What it declares.
public DeclarationKind Kind { get; init; }
Property Value
Location
Where it is declared.
public SourceLocation Location { get; init; }
Property Value
Name
The name it is declared with.
public string Name { get; init; }
Property Value
References
Every reference to it, when every reference to it is in the code that was analyzed and was analyzed completely; null otherwise.
public DeclarationReferences? References { get; init; }
Property Value
Symbol
The identity of the declared symbol.
public SemanticId Symbol { get; init; }