Class DeclarationReference
One place the code of the project refers to a declaration (ReferencedFrom).
public sealed record DeclarationReference : IEquatable<DeclarationReference>
- Inheritance
-
DeclarationReference
- Implements
- Inherited Members
Constructors
DeclarationReference(SourceLocation, Uri?, DeclarationReferenceKind)
One place the code of the project refers to a declaration (ReferencedFrom).
public DeclarationReference(SourceLocation Location, Uri? Procedure, DeclarationReferenceKind Kind)
Parameters
LocationSourceLocationWhere the reference is written: the module, and the range of the name.
ProcedureUriThe procedure whose code the reference is in; null for a reference in the declarations of a module, such as the value of a constant or the bounds of an array of the module.
KindDeclarationReferenceKindWhat the reference does.
Properties
AssignedThroughCall
Whether the reference is an argument (PassedAsArgument) that the call is known to assign: the host followed the
procedure, and it assigns the ByRef parameter or passes it on by reference to a procedure that does (MS-VBAL §5.3.1.11).
false for an argument of a procedure the host does not follow, which may or may not assign it, and for any other reference.
public bool AssignedThroughCall { get; init; }
Property Value
DiscardsResult
Whether the reference calls a Function as a statement, so that nothing uses the value it returns
(ResultDiscarded).
public bool DiscardsResult { get; init; }
Property Value
Kind
What the reference does.
public DeclarationReferenceKind Kind { get; init; }
Property Value
Location
Where the reference is written: the module, and the range of the name.
public SourceLocation Location { get; init; }
Property Value
Procedure
The procedure whose code the reference is in; null for a reference in the declarations of a module, such as the value of a constant or the bounds of an array of the module.
public Uri? Procedure { get; init; }