Table of Contents

Class StreamingCollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>

Namespace
TypedRest.CommandLine.Commands.Reactive
Assembly
TypedRest.CommandLine.dll
public abstract class StreamingCollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand> : CollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>, IEndpointCommand where TEntity : class where TEndpoint : IStreamingCollectionEndpoint<TEntity, TElementEndpoint> where TElementEndpoint : IElementEndpoint<TEntity> where TElementCommand : IEndpointCommand

Type Parameters

TEntity

The type of entity the endpoint represents.

TEndpoint

The specific type of IStreamingCollectionEndpoint<TEntity, TElementEndpoint> to operate on.

TElementEndpoint

The specific type of IElementEndpoint<TEntity> the TEndpoint provides for individual TEntitys.

TElementCommand

The specific type of IEndpointCommand is used to handle TElementEndpoints. Must have a public constructor with a TElementEndpoint parameter.

Inheritance
EndpointCommand<TEndpoint>
IndexerCommand<TEndpoint, TElementEndpoint, TElementCommand>
CollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>
StreamingCollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>
Implements
Derived
Inherited Members

Constructors

StreamingCollectionCommand(TEndpoint)

protected StreamingCollectionCommand(TEndpoint endpoint)

Parameters

endpoint TEndpoint

The endpoint this command operates on.

Methods

ExecuteAsync(IReadOnlyList<string>, CancellationToken)

Parses command-line arguments and executes the resulting operation.

public override Task ExecuteAsync(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