Struct DeclarationReferences
Every reference to a declaration there is, counted by what the reference does.
public readonly record struct DeclarationReferences : IEquatable<DeclarationReferences>
- Implements
- Inherited Members
Remarks
These are the references, all of them: a count is only ever stated for a declaration that nothing outside the code the pass analyzed can refer to
(References). An argument that a call may assign is a reference of its own kind, because what it does is not what the
expression says (MS-VBAL §5.3.1.11): a procedure assigns it through a ByRef parameter that it writes to, or passes on by reference
to a procedure that does. Where the host follows the procedure and finds that nothing assigns the parameter, or the parameter is ByVal, the
argument is a read.
Constructors
DeclarationReferences(int, int, int)
Every reference to a declaration there is, counted by what the reference does.
public DeclarationReferences(int Reads, int Writes, int PassedAsArguments)
Parameters
ReadsintHow many expressions refer to it for its value, or to call it.
WritesintHow many expressions write to it (AssignmentTarget).
PassedAsArgumentsintHow many expressions pass it by reference to a call that may assign it: a procedure that assigns the parameter, or passes it on by reference to one that does, or a procedure the host does not follow, such as one of a library or one called through an object (PassedAsArgument).
Remarks
These are the references, all of them: a count is only ever stated for a declaration that nothing outside the code the pass analyzed can refer to
(References). An argument that a call may assign is a reference of its own kind, because what it does is not what the
expression says (MS-VBAL §5.3.1.11): a procedure assigns it through a ByRef parameter that it writes to, or passes on by reference
to a procedure that does. Where the host follows the procedure and finds that nothing assigns the parameter, or the parameter is ByVal, the
argument is a read.
Properties
PassedAsArguments
How many expressions pass it by reference to a call that may assign it: a procedure that assigns the parameter, or passes it on by reference to one that does, or a procedure the host does not follow, such as one of a library or one called through an object (PassedAsArgument).
public int PassedAsArguments { get; init; }
Property Value
Reads
How many expressions refer to it for its value, or to call it.
public int Reads { get; init; }
Property Value
Total
The number of references of any kind.
public int Total { get; }
Property Value
Writes
How many expressions write to it (AssignmentTarget).
public int Writes { get; init; }