Class SandboxHostWorkerClient
Namespace: DotBoxD.Hosting
Assembly: DotBoxD.Hosting.dll
Reference DotBoxD.Hosting.ISandboxWorkerClient that bridges a worker request to a worker-side
DotBoxD.Hosting.Execution.SandboxHost. The worker independently re-prepares the plan from the transmitted
module and policy instead of trusting the requesting host’s signed plan, then executes it with
the supplied (in-process) options. When the worker is hosted in a separate process, container,
or restricted account, this provides a real out-of-process boundary with a documented envelope.
public sealed class SandboxHostWorkerClient : ISandboxWorkerClient, IDisposableInheritance
Section titled “Inheritance”object ← SandboxHostWorkerClient
Implements
Section titled “Implements”ISandboxWorkerClient, IDisposable
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”The supplied factory is invoked lazily once per client instance so worker-side plan, compiled, and hotness caches can survive across requests. The worker host’s bindings must match the requesting host’s bindings; otherwise the re-prepared identity hashes diverge and the requesting host fails the result closed. Re-preparation or execution failures are surfaced as a closed, fail-safe error result.
Constructors
Section titled “Constructors”SandboxHostWorkerClient(Func<SandboxHost>)
Section titled “ SandboxHostWorkerClient(Func<SandboxHost>)”public SandboxHostWorkerClient(Func<SandboxHost> hostFactory)Parameters
Section titled “Parameters”hostFactory Func<SandboxHost>
Methods
Section titled “Methods”Dispose()
Section titled “ Dispose()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()ExecuteInWorkerAsync(ExecutionPlan, string, SandboxValue, SandboxExecutionOptions, CancellationToken)
Section titled “ ExecuteInWorkerAsync(ExecutionPlan, string, SandboxValue, SandboxExecutionOptions, CancellationToken)”public ValueTask<SandboxExecutionResult> ExecuteInWorkerAsync(ExecutionPlan plan, string entrypoint, SandboxValue input, SandboxExecutionOptions options, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”plan ExecutionPlan
entrypoint string
input SandboxValue
options SandboxExecutionOptions
cancellationToken CancellationToken