Table of Contents

Namespace Ploch.CommandLine.Spectre.Commands

Classes

AppCommand<TSettings>

Base class for application commands that provides common functionality for command execution and validation.

AsyncAppCommand<TSettings>

Base class for asynchronous commands that provides common functionality for command execution and validation.

CommandArgumentsRootProcessor

Applies every registered ICommandSettingsProcessor to a set of command settings, in registration order.

CommandSettingsPropertyTypeProcessor<TProperty>

Base class for processors that handle command settings properties of a specific type.

CommandSettingsValidator<TSettings>

Validates command settings for Spectre.Console command-line applications.

DefaultExceptionHandler

Default implementation of the IExceptionHandler interface that writes exceptions to the console.

ExceptionHandlerFailedException

Thrown by AppCommand<TSettings> and AsyncAppCommand<TSettings> when the registered IExceptionHandler throws while handling an exception.

SupportsTokensAttribute

Marks a command settings property as supporting token substitution.

TokenInfo

Describes a replaceable token that can be substituted into command argument values.

TokensArgumentsProcessor

Substitutes date and time tokens into string command settings properties marked with SupportsTokensAttribute. Recognised tokens are {date} and {datetime}, and both resolve in UTC, not local time.

Interfaces

ICommandSettingsProcessor

Defines a contract for processing command settings before a command is executed.

ICommandSettingsValidator<TSettings>

Defines a validator for command settings.

IExceptionHandler

Defines a contract for handling exceptions that occur during command execution, and - through the handler ConfigureCommandApp(Action<IConfigurator>) installs - a failure before the command runs that is not a parse, binding or validation failure, such as an exception from a command interceptor or from a command that does not derive from AppCommand<TSettings> or AsyncAppCommand<TSettings>.

Enums

ExitCode

Exit codes returned by commands to the operating system.