Class StreamingCollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>
- Namespace
 - TypedRest.CommandLine.Commands.Reactive
 
- Assembly
 - TypedRest.CommandLine.dll
 
Command operating on a IStreamingCollectionEndpoint<TEntity, TElementEndpoint>.
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
TEntityThe type of entity the endpoint represents.
TEndpointThe specific type of IStreamingCollectionEndpoint<TEntity, TElementEndpoint> to operate on.
TElementEndpointThe specific type of IElementEndpoint<TEntity> the
TEndpointprovides for individualTEntitys.TElementCommandThe specific type of IEndpointCommand is used to handle
TElementEndpoints. Must have a public constructor with aTElementEndpointparameter.
- Inheritance
 - 
      
      EndpointCommand<TEndpoint>IndexerCommand<TEndpoint, TElementEndpoint, TElementCommand>CollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>StreamingCollectionCommand<TEntity, TEndpoint, TElementEndpoint, TElementCommand>
 
- Implements
 
- Derived
 
- Inherited Members
 
Constructors
StreamingCollectionCommand(TEndpoint)
Command operating on a IStreamingCollectionEndpoint<TEntity, TElementEndpoint>.
protected StreamingCollectionCommand(TEndpoint endpoint)
  Parameters
endpointTEndpointThe 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
argsIReadOnlyList<string>the console arguments.
cancellationTokenCancellationTokenUsed to cancel the request.
Returns
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
observableIObservable<TEntity>cancellationTokenCancellationToken