Table of Contents

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

policy SandboxPolicy

Properties

Platform

Which platform this sandbox targets.

public SandboxPlatform Platform { get; }

Property Value

SandboxPlatform

Policy

The policy this sandbox enforces.

public SandboxPolicy Policy { get; }

Property Value

SandboxPolicy

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

executablePath string
arguments string
ct CancellationToken

Returns

Task<SandboxExecutionResult>

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

executablePath string

Path to the executable to run.

arguments string

Command-line arguments.

ct CancellationToken

Cancellation token.

Returns

Task<SandboxedProcess>

A handle to the running sandboxed process.