Class ReplSessionHandle
Handle for a single live in-memory REPL session.
public sealed class ReplSessionHandle : IAsyncDisposable
- Inheritance
-
ReplSessionHandle
- Implements
- Inherited Members
Properties
SessionId
public string SessionId { get; }
Property Value
Methods
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.
GetSnapshot()
public SessionSnapshot GetSnapshot()
Returns
RunCommandAsync(string, IReadOnlyDictionary<string, string>, CancellationToken)
Runs a command in this session with prefilled answers for interactive prompts.
public ValueTask<CommandExecution> RunCommandAsync(string commandText, IReadOnlyDictionary<string, string> answers, CancellationToken cancellationToken = default)
Parameters
commandTextstringThe command text to execute.
answersIReadOnlyDictionary<string, string>Prompt answers keyed by prompt name. Overrides session-level answers for the same name.
cancellationTokenCancellationTokenCancellation token.
Returns
- ValueTask<CommandExecution>
The execution result.
RunCommandAsync(string, CancellationToken)
Runs a command in this session.
public ValueTask<CommandExecution> RunCommandAsync(string commandText, CancellationToken cancellationToken = default)
Parameters
commandTextstringThe command text to execute.
cancellationTokenCancellationTokenCancellation token.
Returns
- ValueTask<CommandExecution>
The execution result.