Class ArgumentFact
An argument of a call, and the parameter it is mapped to (MS-VBAL §5.3.1.11): what the procedure called declares of the parameter, so that what the argument is given to can be read without the procedure's declaration, which may be in another module or in a library.
public sealed record ArgumentFact : IEquatable<ArgumentFact>
- Inheritance
-
ArgumentFact
- Implements
- Inherited Members
Remarks
A fact is stated for each argument the static pass maps to a parameter of a procedure it knows: a call of a procedure of the project, of a library or of a
Declare, by its name, qualified, or as a member of an object of a known class. A call bound late, an index of an array, and an argument that maps to
no parameter have none.
Constructors
ArgumentFact(SyntaxNodeId, Uri, ParameterKind, string, bool, bool, bool, bool, bool)
An argument of a call, and the parameter it is mapped to (MS-VBAL §5.3.1.11): what the procedure called declares of the parameter, so that what the argument is given to can be read without the procedure's declaration, which may be in another module or in a library.
public ArgumentFact(SyntaxNodeId Argument, Uri Parameter, ParameterKind Mechanism, string ParameterType, bool IsOptional, bool HasDefaultValue, bool IsParamArray, bool IsExternal, bool IsLibrary)
Parameters
ArgumentSyntaxNodeIdThe argument, as the argument list writes it: a
ByValargument is theByValexpression, and a named argument the value it names, not thename:=around it.ParameterUriThe address of the parameter.
MechanismParameterKindHow the parameter is declared to take its argument (MS-VBAL §5.3.1.5):
ByVal(ExplicitByVal),ByRef(ExplicitByRef), or neither. A parameter declared with neither is passed by reference (ImplicitByRef), except the value parameter of aProperty LetorProperty Set, which is passed by value (ImplicitByVal). A parameter of a library's procedure is ExplicitByRef where the type library declares it by reference, and ExplicitByVal otherwise.ParameterTypestringThe name of the parameter's declared type, as DeclaredType names a type; the name of the unknown type for a parameter declared
As Any, and for one whose type did not resolve.IsOptionalboolWhether the parameter is declared
Optional.HasDefaultValueboolWhether the parameter is declared with a default value (
Optional n As Long = 1).IsParamArrayboolWhether the parameter is a
ParamArray, which takes this argument and every one after it.IsExternalboolWhether the procedure called is declared by a
Declarestatement (MS-VBAL §5.2.3.5).IsLibraryboolWhether the procedure called is a member of a library: the standard library, or a library the project references. A
Declared procedure is declared in the project, and is not one.
Remarks
A fact is stated for each argument the static pass maps to a parameter of a procedure it knows: a call of a procedure of the project, of a library or of a
Declare, by its name, qualified, or as a member of an object of a known class. A call bound late, an index of an array, and an argument that maps to
no parameter have none.
Properties
Argument
The argument, as the argument list writes it: a ByVal argument is the ByVal expression, and a named argument the value it names, not the
name:= around it.
public SyntaxNodeId Argument { get; init; }
Property Value
HasDefaultValue
Whether the parameter is declared with a default value (Optional n As Long = 1).
public bool HasDefaultValue { get; init; }
Property Value
IsExternal
Whether the procedure called is declared by a Declare statement (MS-VBAL §5.2.3.5).
public bool IsExternal { get; init; }
Property Value
IsLibrary
Whether the procedure called is a member of a library: the standard library, or a library the project references. A Declared procedure is
declared in the project, and is not one.
public bool IsLibrary { get; init; }
Property Value
IsOptional
Whether the parameter is declared Optional.
public bool IsOptional { get; init; }
Property Value
IsParamArray
Whether the parameter is a ParamArray, which takes this argument and every one after it.
public bool IsParamArray { get; init; }
Property Value
Mechanism
How the parameter is declared to take its argument (MS-VBAL §5.3.1.5): ByVal (ExplicitByVal),
ByRef (ExplicitByRef), or neither. A parameter declared with neither is passed by reference
(ImplicitByRef), except the value parameter of a Property Let or Property Set, which is passed by value
(ImplicitByVal). A parameter of a library's procedure is ExplicitByRef where the type library
declares it by reference, and ExplicitByVal otherwise.
public ParameterKind Mechanism { get; init; }
Property Value
Parameter
The address of the parameter.
public Uri Parameter { get; init; }
Property Value
ParameterType
The name of the parameter's declared type, as DeclaredType names a type; the name of the unknown type for a parameter declared
As Any, and for one whose type did not resolve.
public string ParameterType { get; init; }