Interface IPbmClient
Represents a programmatic interface for working with a Petabridge.Cmd host.
Namespace: Petabridge.Cmd.Common.Client
Assembly: cs.temp.dll.dll
Syntax
public interface IPbmClient : IDisposable, IAsyncDisposable
Properties
IsAvailable
When true
, our connection to the Petabridge.Cmd host should be healthy.
Declaration
bool IsAvailable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
WhenClosed
A
Declaration
Task WhenClosed { get; }
Property Value
Type | Description |
---|---|
Task |
Methods
CloseAsync()
Asynchronously dispose the client.
Declaration
Task CloseAsync()
Returns
Type | Description |
---|---|
Task | A |
ExecuteTextCommandAsync(Command)
Invokes a command on the server and returns an Akka.Streams
Some requests will return a stream of responses. Others will return a single response and the stream will complete immediately.
Declaration
Task<CommandSession> ExecuteTextCommandAsync(Command cliText)
Parameters
Type | Name | Description |
---|---|---|
Command | cliText | A pre-tokenized Command. |
Returns
Type | Description |
---|---|
Task<CommandSession> |
ExecuteTextCommandAsync(Command, CancellationToken)
Invokes a command on the server and returns an Akka.Streams
Some requests will return a stream of responses. Others will return a single response and the stream will complete immediately.
Declaration
Task<CommandSession> ExecuteTextCommandAsync(Command cliText, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
Command | cliText | A pre-tokenized Command. |
CancellationToken | token | CancellationToken support. |
Returns
Type | Description |
---|---|
Task<CommandSession> |
ExecuteTextCommandAsync(String)
Invokes a command on the server and returns an Akka.Streams
Some requests will return a stream of responses. Others will return a single response and the stream will complete immediately.
Declaration
Task<CommandSession> ExecuteTextCommandAsync(string cliText)
Parameters
Type | Name | Description |
---|---|---|
System.String | cliText | The raw text of the pbm command - identical to what you would type on the commandline. |
Returns
Type | Description |
---|---|
Task<CommandSession> |
ExecuteTextCommandAsync(String, CancellationToken)
Invokes a command on the server and returns an Akka.Streams
Some requests will return a stream of responses. Others will return a single response and the stream will complete immediately.
Declaration
Task<CommandSession> ExecuteTextCommandAsync(string cliText, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
System.String | cliText | The raw text of the pbm command - identical to what you would type on the commandline. |
CancellationToken | token | CancellationToken support. |
Returns
Type | Description |
---|---|
Task<CommandSession> |
GetAvailablePalettes()
Queries the set of CommandPalettes supported by this client.
Declaration
Task<IEnumerable<CommandPalette>> GetAvailablePalettes()
Returns
Type | Description |
---|---|
Task<IEnumerable<CommandPalette>> | An enumerable containing all of the palettes that are available to this client. |