Skip to content

Host<TFixtures>

Namespace: E2E

public sealed class Host<TFixtures> : IAsyncDisposable where TFixtures : class

A host on an engine that contributes fixtures: its sessions are Session&lt;T&gt;. Upstream’s Host<Fixtures> (core/launch.ts).

Type parameters

Name Description
TFixtures What the engine contributes, as IEngine&lt;T&gt; declares.

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<TFixtures>> 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<TFixtures>>

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