Skip to content

Host

Namespace: E2E

public sealed class Host : IAsyncDisposable

One engine instance, initialized: the owner of the sessions opened on it, one at a time. Upstream’s Host (core/launch.ts).

Inheritance: object

Implements: IAsyncDisposable

View source

public string Platform { get; }

The engine’s platform label: web, ios, android, or an engine’s own string.

Value: string

public Task CloseAsync()

Closes the open session, then the engine. Idempotent. Throws an AggregateException of the failures closing found. Upstream’s close.

Returns: Task

public ValueTask DisposeAsync()

Closes the open session, then the engine. Idempotent. Throws an AggregateException of the failures closing found. Upstream’s close.

Returns: ValueTask

NewSessionAsync(NewSessionOptions?, CancellationToken)

Section titled “NewSessionAsync(NewSessionOptions?, CancellationToken)”
public Task<Session> NewSessionAsync(NewSessionOptions? options = null, CancellationToken cancellationToken = default)

Opens a session. One at a time: the previous one must be closed.

Parameters

Name Type Description
options NewSessionOptions
cancellationToken CancellationToken

Returns: Task<Session>

public Secret Secret(string name)

The handle of a secret passed to LaunchAsync, for FillAsync or an agent’s params. An unknown name throws SECRET_UNAVAILABLE.

Parameters

Name Type Description
name string

Returns: Secret