Edit

Share via


OptionResult Class

Definition

A result produced when parsing an Option.

public ref class OptionResult sealed : System::CommandLine::Parsing::SymbolResult
public ref class OptionResult : System::CommandLine::Parsing::SymbolResult
public sealed class OptionResult : System.CommandLine.Parsing.SymbolResult
public class OptionResult : System.CommandLine.Parsing.SymbolResult
type OptionResult = class
    inherit SymbolResult
Public NotInheritable Class OptionResult
Inherits SymbolResult
Public Class OptionResult
Inherits SymbolResult
Inheritance
OptionResult

Properties

Children

Child symbol results in the parse tree.

(Inherited from SymbolResult)
ErrorMessage

An error message for this symbol result.

(Inherited from SymbolResult)
Errors

The parse errors associated with this symbol result.

(Inherited from SymbolResult)
IdentifierToken

The token that was parsed to specify the option.

IdentifierTokenCount

The number of occurrences of an identifier token matching the option.

Implicit

Indicates whether the result was created implicitly and not due to the option being specified on the command line.

IsImplicit

Indicates whether the result was created implicitly and not due to the option being specified on the command line.

LocalizationResources

Localization resources used to produce messages for this symbol result.

(Inherited from SymbolResult)
Option

The option to which the result applies.

Parent

The parent symbol result in the parse tree.

(Inherited from SymbolResult)
Symbol

The symbol to which the result applies.

(Inherited from SymbolResult)
Token

The token that was parsed to specify the option.

Tokens

The list of tokens associated with this symbol result during parsing.

(Inherited from SymbolResult)

Methods

AddError(String)

Adds an error message for this symbol result to it's parse tree.

(Inherited from SymbolResult)
FindResultFor(Argument)

Finds a result for the specific argument anywhere in the parse tree, including parent and child symbol results.

(Inherited from SymbolResult)
FindResultFor(Command)

Finds a result for the specific command anywhere in the parse tree, including parent and child symbol results.

(Inherited from SymbolResult)
FindResultFor(Option)

Finds a result for the specific option anywhere in the parse tree, including parent and child symbol results.

(Inherited from SymbolResult)
GetRequiredValue<T>(Argument<T>)

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

(Inherited from SymbolResult)
GetRequiredValue<T>(Option<T>)

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

(Inherited from SymbolResult)
GetRequiredValue<T>(String)

Gets the value for a symbol having the specified name anywhere in the parse tree.

(Inherited from SymbolResult)
GetResult(Argument)

Finds a result for the specific argument anywhere in the parse tree, including parent and child symbol results.

(Inherited from SymbolResult)
GetResult(Command)

Finds a result for the specific command anywhere in the parse tree, including parent and child symbol results.

(Inherited from SymbolResult)
GetResult(Directive)

Finds a result for the specific directive anywhere in the parse tree.

(Inherited from SymbolResult)
GetResult(Option)

Finds a result for the specific option anywhere in the parse tree, including parent and child symbol results.

(Inherited from SymbolResult)
GetResult(String)

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

(Inherited from SymbolResult)
GetValue<T>(Argument<T>)

Gets the parsed or default value for the specified argument.

(Inherited from SymbolResult)
GetValue<T>(Option<T>)

Gets the parsed or default value for the specified option.

(Inherited from SymbolResult)
GetValue<T>(String)

Gets the value for a symbol having the specified name anywhere in the parse tree.

(Inherited from SymbolResult)
GetValueForArgument(Argument)

Gets the parsed or default value for the specified argument.

(Inherited from SymbolResult)
GetValueForArgument<T>(Argument<T>)

Gets the parsed or default value for the specified argument.

(Inherited from SymbolResult)
GetValueForOption(Option)

Gets the parsed or default value for the specified option.

(Inherited from SymbolResult)
GetValueForOption<T>(Option<T>)

Gets the parsed or default value for the specified option.

(Inherited from SymbolResult)
GetValueOrDefault()

Gets the parsed value or the default value for Option.

GetValueOrDefault<T>()

Gets the parsed value or the default value for Option.

ToString()

Returns a string that represents the current object.

ToString()

Returns a string that represents the current object.

(Inherited from SymbolResult)

Applies to