Table of Contents

Class StreamingCommand<TEntity, TEndpoint>

Namespace
TypedRest.CommandLine.Commands.Reactive
Assembly
TypedRest.CommandLine.dll

Command operating on a IStreamingEndpoint<TEntity>.

public abstract class StreamingCommand<TEntity, TEndpoint> : EndpointCommand<TEndpoint>, IEndpointCommand where TEndpoint : IStreamingEndpoint<TEntity>

Type Parameters

TEntity

The type of entity the endpoint represents.

TEndpoint

The specific type of IStreamingEndpoint<TEntity> to operate on.

Inheritance
EndpointCommand<TEndpoint>
StreamingCommand<TEntity, TEndpoint>
Implements
Inherited Members

Constructors

StreamingCommand(TEndpoint)

Command operating on a IStreamingEndpoint<TEntity>.

protected StreamingCommand(TEndpoint endpoint)

Parameters

endpoint TEndpoint

The endpoint this command operates on.

Methods

ExecuteInnerAsync(IReadOnlyList<string>, CancellationToken)

Parses command-line arguments and executes the resulting operation when no additional sub-IEndpointCommand is specified.

protected override Task ExecuteInnerAsync(IReadOnlyList<string> args, CancellationToken cancellationToken = default)

Parameters

args IReadOnlyList<string>

the console arguments.

cancellationToken CancellationToken

Used to cancel the request.

Returns

Task

OutputEntitiesAsync(IObservable<TEntity>, CancellationToken)

Outputs a stream of TEntitys to the user, e.g., via ToString() on the console.

protected virtual Task OutputEntitiesAsync(IObservable<TEntity> observable, CancellationToken cancellationToken = default)

Parameters

observable IObservable<TEntity>
cancellationToken CancellationToken

Returns

Task