Show / Hide Table of Contents

Interface IPbmClient

Represents a programmatic interface for working with a Petabridge.Cmd host.

Inherited Members
IDisposable.Dispose()
IAsyncDisposable.DisposeAsync()
Namespace: Petabridge.Cmd.Common.Client
Assembly: Petabridge.Cmd.Common.dll
Syntax
public interface IPbmClient : IDisposable, IAsyncDisposable, INoSerializationVerificationNeeded

Properties

IsAvailable

When true, our connection to the Petabridge.Cmd host should be healthy.

Declaration
bool IsAvailable { get; }
Property Value
Type Description
bool

WhenClosed

A Task that completes when the client has been terminated.

Declaration
Task WhenClosed { get; }
Property Value
Type Description
Task

Methods

CloseAsync()

Asynchronously dispose the client.

Declaration
Task CloseAsync()
Returns
Type Description
Task

A Task that completes when the client has been terminated.

ExecuteTextCommandAsync(Command)

Invokes a command on the server and returns an Akka.Streams ISourceRef<TOut>, which can be used to construct an Akka.Streams graph locally on the client.

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>

A CommandSession

ExecuteTextCommandAsync(Command, CancellationToken)

Invokes a command on the server and returns an Akka.Streams ISourceRef<TOut>, which can be used to construct an Akka.Streams graph locally on the client.

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>

A CommandSession

ExecuteTextCommandAsync(string)

Invokes a command on the server and returns an Akka.Streams ISourceRef<TOut>, which can be used to construct an Akka.Streams graph locally on the client.

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
string cliText

The raw text of the pbm command - identical to what you would type on the commandline.

Returns
Type Description
Task<CommandSession>

A CommandSession

ExecuteTextCommandAsync(string, CancellationToken)

Invokes a command on the server and returns an Akka.Streams ISourceRef<TOut>, which can be used to construct an Akka.Streams graph locally on the client.

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

A 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.

In this article
Back to top Generated by DocFX