Class NoneSandbox
- Namespace
- JD.AI.Sandbox.Abstractions
- Assembly
- JD.AI.Sandbox.dll
A no-op sandbox that runs processes without any OS-level isolation. Used as fallback when platform-specific sandboxing is unavailable, or for testing where isolation is not required.
public sealed class NoneSandbox : ISandbox
- Inheritance
-
NoneSandbox
- Implements
- Inherited Members
Constructors
NoneSandbox(SandboxPolicy)
public NoneSandbox(SandboxPolicy policy)
Parameters
policySandboxPolicy
Properties
Platform
Which platform this sandbox targets.
public SandboxPlatform Platform { get; }
Property Value
Policy
The policy this sandbox enforces.
public SandboxPolicy Policy { get; }
Property Value
Methods
RunAsync(string, string, CancellationToken)
Runs the sandboxed process to completion and returns the result.
public Task<SandboxExecutionResult> RunAsync(string executablePath, string arguments = "", CancellationToken ct = default)
Parameters
executablePathstringargumentsstringctCancellationToken
Returns
StartAsync(string, string, CancellationToken)
Starts a new sandboxed process using the configured policy.
public Task<SandboxedProcess> StartAsync(string executablePath, string arguments = "", CancellationToken ct = default)
Parameters
executablePathstringPath to the executable to run.
argumentsstringCommand-line arguments.
ctCancellationTokenCancellation token.
Returns
- Task<SandboxedProcess>
A handle to the running sandboxed process.