RemoteReplClient
A CLI-profile client. Disposing it leaves caller-provided streams open.
- Kind:
Class - Namespace: Repl.Remote
- Assembly:
Repl.Remote - Source: src/Repl.Remote/RemoteReplClient.cs
Signature
Section titled “Signature”public sealed class RemoteReplClient : IAsyncDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Constructors
Section titled “Constructors”RemoteReplClient(Stream)
Section titled “RemoteReplClient(Stream)”Creates a client over a borrowed duplex stream.
public RemoteReplClient(Stream stream)Parameters
Section titled “Parameters”stream(Stream)
RemoteReplClient(Stream, Stream)
Section titled “RemoteReplClient(Stream, Stream)”Creates a client over borrowed input and output streams.
public RemoteReplClient(Stream input, Stream output)Parameters
Section titled “Parameters”Methods
Section titled “Methods”DescribeAsync(CancellationToken)
Section titled “DescribeAsync(CancellationToken)”Reads the exposed command graph.
public Task<RemoteCommandGraph> DescribeAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken(CancellationToken)
Returns
Section titled “Returns”Task<RemoteCommandGraph>
DiscoverAsync(CancellationToken)
Section titled “DiscoverAsync(CancellationToken)”Reads the peer’s OpenRPC document and checks the CLI profile major version.
public Task<JsonElement> DiscoverAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken(CancellationToken)
Returns
Section titled “Returns”Task<JsonElement>
DisposeAsync()
Section titled “DisposeAsync()”Disconnects this client, disposing only a stream created by its named-pipe factory.
public ValueTask DisposeAsync()Returns
Section titled “Returns”ExecuteAsync(RemoteInvocationRequest, CancellationToken)
Section titled “ExecuteAsync(RemoteInvocationRequest, CancellationToken)”Executes once; a lost response is never retried automatically.
public Task<RemoteExecutionResult> ExecuteAsync(RemoteInvocationRequest request, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”request(RemoteInvocationRequest)cancellationToken(CancellationToken)
Returns
Section titled “Returns”Task<RemoteExecutionResult>
OpenTerminalAsync(RemoteTerminalOptions?, CancellationToken)
Section titled “OpenTerminalAsync(RemoteTerminalOptions?, CancellationToken)”Opens a terminal; consume its output until completion.
public Task<RemoteTerminal> OpenTerminalAsync(RemoteTerminalOptions? options = null, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”options(RemoteTerminalOptions)cancellationToken(CancellationToken)
Returns
Section titled “Returns”Task<RemoteTerminal>