Table of Contents

Class ConsumerCommand<TEntity>

Namespace
TypedRest.CommandLine.Commands.Rpc
Assembly
TypedRest.CommandLine.dll

Command operating on an IConsumerEndpoint<TEntity>.

public class ConsumerCommand<TEntity> : EndpointCommand<IConsumerEndpoint<TEntity>>, IEndpointCommand

Type Parameters

TEntity

The type of entity the IConsumerEndpoint<TEntity> takes as input.

Inheritance
ConsumerCommand<TEntity>
Implements
Inherited Members

Constructors

ConsumerCommand(IConsumerEndpoint<TEntity>)

Command operating on an IConsumerEndpoint<TEntity>.

public ConsumerCommand(IConsumerEndpoint<TEntity> endpoint)

Parameters

endpoint IConsumerEndpoint<TEntity>

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

InputEntity(IReadOnlyList<string>)

Acquires a TEntity from the user, e.g. by parsing the args or via JSON on the console.

protected virtual TEntity InputEntity(IReadOnlyList<string> args)

Parameters

args IReadOnlyList<string>

Returns

TEntity