Table of Contents

Class ProducerCommand<TResult>

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

Command operating on an IProducerEndpoint<TResult>.

public class ProducerCommand<TResult> : EndpointCommand<IProducerEndpoint<TResult>>, IEndpointCommand

Type Parameters

TResult

The type of entity the IProducerEndpoint<TResult> returns as a result.

Inheritance
ProducerCommand<TResult>
Implements
Inherited Members

Constructors

ProducerCommand(IProducerEndpoint<TResult>)

Command operating on an IProducerEndpoint<TResult>.

public ProducerCommand(IProducerEndpoint<TResult> endpoint)

Parameters

endpoint IProducerEndpoint<TResult>

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

OutputEntity(TResult)

Outputs a TResult to the user via the console.

protected virtual void OutputEntity(TResult entity)

Parameters

entity TResult