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
TThe 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
parametersTresultParseResult
Methods
InvokeAsync(CancellationToken)
Outputs the command class name, parse result, and parameter values to the console.
public Task<int> InvokeAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.