CliContext Class
Supports command invocation by providing access to parse results and other services.
Namespace: DotMake.CommandLineAssembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 2.3.0
- Inheritance
- Object CliContext
CliContext |
Initializes a new instance of the CliContext class.
|
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.
|
IsEmptyCommand |
Gets a value indicating whether current command is specified without any arguments or options.
Note that arguments and options should be optional, if they are required (no default values),
then handler will not run and missing error message will be shown.
|
ShowHelp |
Shows help for current command.
|
ShowHierarchy |
Shows hierarchy for all commands. It will start from the root command and show a tree. Useful for testing a command.
|
ShowValues |
Shows parsed values for current command and its arguments and options. Useful for testing a command.
|