Table of Contents

Class PollingCommand<TEntity>

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

Command operating on an IPollingEndpoint<TEntity>.

public class PollingCommand<TEntity> : ElementCommand<TEntity>, IEndpointCommand where TEntity : class

Type Parameters

TEntity

The type of entity the endpoint represents.

Inheritance
PollingCommand<TEntity>
Implements
Inherited Members

Constructors

PollingCommand(IPollingEndpoint<TEntity>)

Command operating on an IPollingEndpoint<TEntity>.

public PollingCommand(IPollingEndpoint<TEntity> endpoint)

Parameters

endpoint IPollingEndpoint<TEntity>

The endpoint this command operates on.

Fields

Endpoint

protected readonly IPollingEndpoint<TEntity> Endpoint

Field Value

IPollingEndpoint<TEntity>

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