Table of Contents

Class ArgumentFact

Namespace
RDCore.SDK.Semantics
Assembly
RDCore.SDK.dll

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

Argument SyntaxNodeId

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.

Parameter Uri

The address of the parameter.

Mechanism ParameterKind

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.

ParameterType string

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.

IsOptional bool

Whether the parameter is declared Optional.

HasDefaultValue bool

Whether the parameter is declared with a default value (Optional n As Long = 1).

IsParamArray bool

Whether the parameter is a ParamArray, which takes this argument and every one after it.

IsExternal bool

Whether the procedure called is declared by a Declare statement (MS-VBAL §5.2.3.5).

IsLibrary bool

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.

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

SyntaxNodeId

HasDefaultValue

Whether the parameter is declared with a default value (Optional n As Long = 1).

public bool HasDefaultValue { get; init; }

Property Value

bool

IsExternal

Whether the procedure called is declared by a Declare statement (MS-VBAL §5.2.3.5).

public bool IsExternal { get; init; }

Property Value

bool

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

bool

IsOptional

Whether the parameter is declared Optional.

public bool IsOptional { get; init; }

Property Value

bool

IsParamArray

Whether the parameter is a ParamArray, which takes this argument and every one after it.

public bool IsParamArray { get; init; }

Property Value

bool

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

ParameterKind

Parameter

The address of the parameter.

public Uri Parameter { get; init; }

Property Value

Uri

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; }

Property Value

string