Table of Contents

Struct ExternalCallDecision

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

What an IExternalCallInterceptor decided about a call: let it through, refuse it, or answer it.

public readonly record struct ExternalCallDecision : IEquatable<ExternalCallDecision>
Implements
Inherited Members

Constructors

ExternalCallDecision(string?, ExternalCallAnswer?)

What an IExternalCallInterceptor decided about a call: let it through, refuse it, or answer it.

public ExternalCallDecision(string? Reason, ExternalCallAnswer? Answer = null)

Parameters

Reason string

Why the call was refused, in words a person reading a diagnostic needs: null when it was not refused.

Answer ExternalCallAnswer

What the call yields in place of running it: null when it was not answered.

Properties

Allow

Let the call through.

public static ExternalCallDecision Allow { get; }

Property Value

ExternalCallDecision

Answer

What the call yields in place of running it: null when it was not answered.

public ExternalCallAnswer? Answer { get; init; }

Property Value

ExternalCallAnswer

IsAnswered

Whether the call was answered (Answer), and is not to be run.

public bool IsAnswered { get; }

Property Value

bool

IsBlocked

Whether the call was refused.

public bool IsBlocked { get; }

Property Value

bool

Reason

Why the call was refused, in words a person reading a diagnostic needs: null when it was not refused.

public string? Reason { get; init; }

Property Value

string

Methods

Answered(ExternalCallAnswer)

Answer the call: it is not run, and the call site gets answer as though the member had returned it.

public static ExternalCallDecision Answered(ExternalCallAnswer answer)

Parameters

answer ExternalCallAnswer

What the call yields: a result or an error, and the ByRef arguments it writes.

Returns

ExternalCallDecision

Block(string)

Refuse the call.

public static ExternalCallDecision Block(string reason)

Parameters

reason string

Why: it reaches the workspace as the verbose half of a Permission denied run-time error, so it should say what was refused and on what grounds.

Returns

ExternalCallDecision