ReplTestHost
In-memory orchestrator for opening and coordinating multiple REPL test sessions.
- Kind:
Class - Namespace: Repl.Testing
- Assembly:
Repl.Testing - Source: src/Repl.Testing/ReplTestHost.cs
Signature
Section titled “Signature”public sealed class ReplTestHost : IAsyncDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Methods
Section titled “Methods”Create(Func<ReplApp>, Action<ReplScenarioOptions>?)
Section titled “Create(Func<ReplApp>, Action<ReplScenarioOptions>?)”public static ReplTestHost Create(Func<ReplApp> appFactory, Action<ReplScenarioOptions>? configure = null)Parameters
Section titled “Parameters”appFactory(Func<ReplApp>)configure(Action<ReplScenarioOptions>)
Returns
Section titled “Returns”DisposeAsync()
Section titled “DisposeAsync()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()Returns
Section titled “Returns”ValueTask - A task that represents the asynchronous dispose operation.
OpenSessionAsync(SessionDescriptor?, CancellationToken)
Section titled “OpenSessionAsync(SessionDescriptor?, CancellationToken)”public ValueTask<ReplSessionHandle> OpenSessionAsync(SessionDescriptor? descriptor = null, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”descriptor(SessionDescriptor)cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<ReplSessionHandle>
QuerySessionsAsync(CancellationToken)
Section titled “QuerySessionsAsync(CancellationToken)”public ValueTask<IReadOnlyList<SessionSnapshot>> QuerySessionsAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken(CancellationToken)
Returns
Section titled “Returns”ValueTask<IReadOnlyList<SessionSnapshot>>