Table of Contents

Class DefaultAsyncCommandHandler<T>

Namespace
Albatross.CommandLine
Assembly
Albatross.CommandLine.dll

A default command handler that outputs diagnostic information about the command invocation. Useful for testing and debugging command configurations.

public class DefaultAsyncCommandHandler<T> : IAsyncCommandHandler where T : class

Type Parameters

T

The type of the command parameters class.

Inheritance
DefaultAsyncCommandHandler<T>
Implements
Inherited Members

Constructors

DefaultAsyncCommandHandler(T, ParseResult)

Initializes a new instance of the default handler with the parameters and parse result.

public DefaultAsyncCommandHandler(T parameters, ParseResult result)

Parameters

parameters T
result ParseResult

Methods

InvokeAsync(CancellationToken)

Outputs the command class name, parse result, and parameter values to the console.

public Task<int> InvokeAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task<int>

Always returns 0 (success).