CliContext Class

Supports command invocation by providing access to parse results and other services.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.8
C#
public class CliContext
Inheritance
Object    CliContext

Constructors

CliContext Initializes a new instance of the CliContext class.

Properties

CancellationToken Gets the token to implement cancellation handling. Available for async command handlers.
Error Gets the standard error, to which error information should be written during the current invocation. By default, it's set to Error, it's changed via Error.
Output Gets the standard output, to which non-error information should be written during the current invocation. By default, it's set to Out, it's changed via Output.
ParseResult Gets the parse result for the current invocation.

Methods

IsEmptyCommand Gets a value indicating whether current command is specified without any arguments or options.
ShowHelp Shows help for current command.
ShowValues Shows parsed values for current command and its arguments and options. Useful for testing a command.

See Also