Table of Contents

Class ExternalCallRequest

Namespace
RDCore.SDK.Runtime.Abstract.Execution
Assembly
RDCore.SDK.dll

One call to something that is not the workspace's own code: a standard-library member, a referenced library's, a host application's object model, or a native export a Declare named.

public sealed record ExternalCallRequest : IEquatable<ExternalCallRequest>
Inheritance
ExternalCallRequest
Implements
Inherited Members

Remarks

A growable record rather than a parameter list, so a new fact about a call — the policy decision that let it through, the reference it came from — gets a field here rather than a new parameter on every dispatcher.

Constructors

ExternalCallRequest(VBTypeMemberSymbol, IRuntimeValue[], SourceLocation)

One call to something that is not the workspace's own code: a standard-library member, a referenced library's, a host application's object model, or a native export a Declare named.

public ExternalCallRequest(VBTypeMemberSymbol Member, IRuntimeValue[] Arguments, SourceLocation CallSite = default)

Parameters

Member VBTypeMemberSymbol

The member being called. Its ExternalTarget is what says which implementation to reach, and its own parameters say how to marshal the arguments.

Arguments IRuntimeValue[]

The arguments, in the member's declared parameter order, including the receiver at index 0 for a member of a class — the same shape Invoke(VBTypeMemberSymbol, ISymbolResolver, IRuntimeValue[]) takes, so a call site does not have to know which of the two will run it.

CallSite SourceLocation

Where the call is written. An external member that raises an error cannot know this for itself, and an error with no location is one no editor can point at.

Remarks

A growable record rather than a parameter list, so a new fact about a call — the policy decision that let it through, the reference it came from — gets a field here rather than a new parameter on every dispatcher.

Properties

Arguments

The arguments, in the member's declared parameter order, including the receiver at index 0 for a member of a class — the same shape Invoke(VBTypeMemberSymbol, ISymbolResolver, IRuntimeValue[]) takes, so a call site does not have to know which of the two will run it.

public IRuntimeValue[] Arguments { get; init; }

Property Value

IRuntimeValue[]

CallSite

Where the call is written. An external member that raises an error cannot know this for itself, and an error with no location is one no editor can point at.

public SourceLocation CallSite { get; init; }

Property Value

SourceLocation

IsLibraryImport

Whether this call is to a native library a Declare named — the calls an administrator most wants a say over, since a library call is a way to run arbitrary code.

public bool IsLibraryImport { get; }

Property Value

bool

Library

The library a Declare named, or null for a call that is not one.

public string? Library { get; }

Property Value

string

Member

The member being called. Its ExternalTarget is what says which implementation to reach, and its own parameters say how to marshal the arguments.

public VBTypeMemberSymbol Member { get; init; }

Property Value

VBTypeMemberSymbol

Methods

Describe()

The call as one line, arguments included: what an interceptor logs, and what the verbose half of a refusal has to say so that a reader can tell which call was refused.

public string Describe()

Returns

string

Remarks

Names the library and the entry point a Declare actually reaches — its Alias when it has one, since that is the exported name and the VBA name may be nothing like it.