Class ExternalCallAnswer
What an answered call yields, in place of running it: the answer of a fake.
public sealed record ExternalCallAnswer : IEquatable<ExternalCallAnswer>
- Inheritance
-
ExternalCallAnswer
- Implements
- Inherited Members
Constructors
ExternalCallAnswer(VBTypedValue?, IVBRaisableError?, ImmutableArray<ExternalCallAssignment>)
What an answered call yields, in place of running it: the answer of a fake.
public ExternalCallAnswer(VBTypedValue? Result, IVBRaisableError? Error = null, ImmutableArray<ExternalCallAssignment> Assignments = default)
Parameters
ResultVBTypedValueThe value the call returns: null for a
Sub, and whenErroris set.ErrorIVBRaisableErrorThe error the call raises at its call site, as the member would raise its own: null when it returns.
AssignmentsImmutableArray<ExternalCallAssignment>The
ByRefarguments the call writes before it returns or raises. Empty when it writes none.
Properties
Assignments
The ByRef arguments the call writes, in order. Empty when it writes none.
public ImmutableArray<ExternalCallAssignment> Assignments { get; init; }
Property Value
Error
The error the call raises at its call site, as the member would raise its own: null when it returns.
public IVBRaisableError? Error { get; init; }
Property Value
Result
The value the call returns: null for a Sub, and when Error is set.
public VBTypedValue? Result { get; init; }
Property Value
Methods
Raising(IVBRaisableError)
The answer of a call that raises error.
public static ExternalCallAnswer Raising(IVBRaisableError error)
Parameters
errorIVBRaisableErrorThe error raised at the call site.
Returns
Returning(VBTypedValue?)
The answer of a call that returns result.
public static ExternalCallAnswer Returning(VBTypedValue? result)
Parameters
resultVBTypedValueThe value returned: null for a
Sub.