Class ProgramCall
A call that an invocation makes in its run, other than the procedure's: one of its Calls, whose value is kept under Name, one of its Guards, or one of its ResultCalls. It calls a function of a standard module, a function of a predeclared class on the class's default instance (MS-VBAL §5.2.4.1.2), or, with no Procedure, makes a new object of a class (MS-VBAL §5.6.8).
public sealed record ProgramCall : IEquatable<ProgramCall>
- Inheritance
-
ProgramCall
- Implements
- Inherited Members
Remarks
Its arguments bind to the function's parameters as the arguments of an invocation do (ProgramInvocation): an argument that names no
parameter, or two that name the same one, is error 448; a parameter with no argument that is not Optional, error 449; a value that does not
convert, error 13.
A module the program does not have as one of these, a class with a Procedure whose VB_PredeclaredId is not True, a
standard module or a library's module with no Procedure, or a Procedure that is not a Public Function or
Property Get of the module, ends the invocation as NotFound before anything runs.
Constructors
ProgramCall(string, string, string?, IReadOnlyList<ProgramArgument>, bool)
A call that an invocation makes in its run, other than the procedure's: one of its Calls, whose value is kept under Name, one of its Guards, or one of its ResultCalls. It calls a function of a standard module, a function of a predeclared class on the class's default instance (MS-VBAL §5.2.4.1.2), or, with no Procedure, makes a new object of a class (MS-VBAL §5.6.8).
public ProgramCall(string Name, string Module, string? Procedure, IReadOnlyList<ProgramArgument> Arguments, bool MachineHeld = false)
Parameters
NamestringThe name its value is kept under, which a ProgramCallArgument names. The calls of one invocation, its guards and its result calls have one name each, compared ordinally.
ModulestringThe name of the module, as RD-VBA names it: a standard module or a class module of the program (not a document module), or, qualified with the name of a library the program references whose code is RD-VBA code (a project, MS-VBAL §4.1), a standard module of that library:
Library.Module. A library's module may be a private module (MS-VBAL §5.2.1.4), which the program itself cannot name.ProcedurestringThe name of a
PublicFunctionorProperty Getof that module. null for a new object of the class module Module names, which itsClass_Initializeinitializes (MS-VBAL §5.3.1.10); Arguments is empty then.ArgumentsIReadOnlyList<ProgramArgument>The arguments, by the names of the parameters they are passed to; an
Optionalparameter may have none.MachineHeldboolWhether its value is the machine's: made by the first invocation that has the call, and kept for the invocations after it, which do not make it again. A later invocation's call of the same Name passes the value that is kept, whatever module and procedure it names. The value is kept until ResetAsync(CancellationToken) lets go of it (an object that nothing else holds runs its
Class_Terminatethen), or the machine is disposed. An error that ends a run, or anEnd, ends the program, and lets go of it with everything else, running noClass_Terminate. Only a call of Calls is machine-held.
Remarks
Its arguments bind to the function's parameters as the arguments of an invocation do (ProgramInvocation): an argument that names no
parameter, or two that name the same one, is error 448; a parameter with no argument that is not Optional, error 449; a value that does not
convert, error 13.
A module the program does not have as one of these, a class with a Procedure whose VB_PredeclaredId is not True, a
standard module or a library's module with no Procedure, or a Procedure that is not a Public Function or
Property Get of the module, ends the invocation as NotFound before anything runs.
Properties
Arguments
The arguments, by the names of the parameters they are passed to; an Optional parameter may have none.
public IReadOnlyList<ProgramArgument> Arguments { get; init; }
Property Value
MachineHeld
Whether its value is the machine's: made by the first invocation that has the call, and kept for the invocations after it, which do not make it again.
A later invocation's call of the same Name passes the value that is kept, whatever module and procedure it names. The value is kept until
ResetAsync(CancellationToken) lets go of it (an object that nothing else holds runs its Class_Terminate then), or the machine is
disposed. An error that ends a run, or an End, ends the program, and lets go of it with everything else, running no Class_Terminate.
Only a call of Calls is machine-held.
public bool MachineHeld { get; init; }
Property Value
Module
The name of the module, as RD-VBA names it: a standard module or a class module of the program (not a document module), or, qualified with the name
of a library the program references whose code is RD-VBA code (a project, MS-VBAL §4.1), a standard module of that library:
Library.Module. A library's module may be a private module (MS-VBAL §5.2.1.4), which the program itself cannot name.
public string Module { get; init; }
Property Value
Name
The name its value is kept under, which a ProgramCallArgument names. The calls of one invocation, its guards and its result calls have one name each, compared ordinally.
public string Name { get; init; }
Property Value
Procedure
The name of a Public Function or Property Get of that module. null for a new object of the class module
Module names, which its Class_Initialize initializes (MS-VBAL §5.3.1.10); Arguments is empty then.
public string? Procedure { get; init; }