Interface IExternalDispatcher
Runs a call to something outside the workspace.
public interface IExternalDispatcher
Remarks
The counterpart of IProcedureInvoker, which runs the workspace's own procedures. The two are chosen between by one fact: a workspace procedure has an instruction list, an external member has a ExternalTarget. Nothing above that point (the resolver, the expression evaluator, the executor, the semantics) is aware of the difference, which is the whole reason this is shaped like the invoker it sits beside.
🎯 Implementations are expected to be composed rather than singular: an availability check, then the
workspace's own policy, then whatever is intercepting calls (a log, a mock), and only then the provider
that really runs it. A call that is refused, or answered by an interceptor, never reaches a provider,
which is what makes a Declare blockable and a MsgBox mockable without either of them
knowing.
⚖️RDCore provides implementations of this interface licensed under GPLv3.
Methods
Invoke(ExternalCallRequest, IRuntimeSymbolResolver)
Runs request and returns what it yielded, the way the semantics of the language
do: an error is in the result rather than thrown.
RuntimeSemanticsEvaluationResult Invoke(ExternalCallRequest request, IRuntimeSymbolResolver resolver)
Parameters
requestExternalCallRequestThe call to run.
resolverIRuntimeSymbolResolverThe running session's symbols and their storage.
Returns
Remarks
A member this dispatcher cannot reach (no implementation, no provider, or a policy that refuses it) is a run-time error saying so, not an internal error and never a silent success. A workspace can trap it like any other.