Edit

Share via


ParseResult Class

Definition

Describes the results of parsing a command line input based on a specific parser configuration.

public ref class ParseResult sealed
public sealed class ParseResult
type ParseResult = class
Public NotInheritable Class ParseResult
Inheritance
ParseResult

Properties

Action

Gets the CommandLineAction for parsed result. The handler represents the action that will be performed when the parse result is invoked.

CommandResult

A result indicating the command specified in the command line input.

Configuration

The configuration used to produce the parse result.

Errors

Gets the parse errors found while parsing command line input.

InvocationConfiguration

The configuration used to specify command line runtime behavior.

RootCommandResult

Gets the root command result.

Tokens

Gets the tokens identified while parsing command line input.

UnmatchedTokens

Gets the list of tokens used on the command line that were not matched by the parser.

Methods

GetCompletionContext()

Gets the completion context for the parse result.

GetCompletions(Nullable<Int32>)

Gets completions based on a given parse result.

GetRequiredValue<T>(Argument<T>)

Gets the parsed or default value for the specified required argument or throws.

GetRequiredValue<T>(Option<T>)

Gets the parsed or default value for the specified required option or throws.

GetRequiredValue<T>(String)

Gets the parsed or default value for the specified required symbol name, in the context of parsed command (not entire symbol tree).

GetResult(Argument)

Gets the result, if any, for the specified argument.

GetResult(Command)

Gets the result, if any, for the specified command.

GetResult(Directive)

Gets the result, if any, for the specified directive.

GetResult(Option)

Gets the result, if any, for the specified option.

GetResult(String)

Finds a result for a symbol having the specified name anywhere in the parse tree.

GetResult(Symbol)

Gets the result, if any, for the specified symbol.

GetValue<T>(Argument<T>)

Gets the parsed or default value for the specified argument.

GetValue<T>(Option<T>)

Gets the parsed or default value for the specified option.

GetValue<T>(String)

Gets the parsed or default value for the specified symbol name, in the context of parsed command (not entire symbol tree).

Invoke(InvocationConfiguration)

Invokes the appropriate command handler for a parsed command line input.

InvokeAsync(InvocationConfiguration, CancellationToken)

Invokes the appropriate command handler for a parsed command line input.

ToString()

Returns a string that represents the current object.

Applies to