ParseResult.GetResult Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| 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. |
| GetResult(Option) |
Gets the result, if any, for the specified option. |
| GetResult(Command) |
Gets the result, if any, for the specified command. |
| GetResult(Argument) |
Gets the result, if any, for the specified argument. |
| GetResult(Directive) |
Gets the result, if any, for the specified directive. |
GetResult(String)
- Source:
- ParseResult.cs
Finds a result for a symbol having the specified name anywhere in the parse tree.
public:
System::CommandLine::Parsing::SymbolResult ^ GetResult(System::String ^ name);
public System.CommandLine.Parsing.SymbolResult? GetResult(string name);
member this.GetResult : string -> System.CommandLine.Parsing.SymbolResult
Public Function GetResult (name As String) As SymbolResult
Parameters
- name
- String
The name of the symbol for which to find a result.
Returns
An symbol result if the argument was matched by the parser or has a default value; otherwise, null.
Applies to
GetResult(Symbol)
- Source:
- ParseResult.cs
Gets the result, if any, for the specified symbol.
public:
System::CommandLine::Parsing::SymbolResult ^ GetResult(System::CommandLine::Symbol ^ symbol);
public System.CommandLine.Parsing.SymbolResult? GetResult(System.CommandLine.Symbol symbol);
member this.GetResult : System.CommandLine.Symbol -> System.CommandLine.Parsing.SymbolResult
Public Function GetResult (symbol As Symbol) As SymbolResult
Parameters
- symbol
- Symbol
The symbol for which to find a result.
Returns
A result for the specified symbol, or null if it was not provided and no default was configured.
Applies to
GetResult(Option)
- Source:
- ParseResult.cs
Gets the result, if any, for the specified option.
public:
System::CommandLine::Parsing::OptionResult ^ GetResult(System::CommandLine::Option ^ option);
public System.CommandLine.Parsing.OptionResult? GetResult(System.CommandLine.Option option);
member this.GetResult : System.CommandLine.Option -> System.CommandLine.Parsing.OptionResult
Public Function GetResult (option As Option) As OptionResult
Parameters
- option
- Option
The option for which to find a result.
Returns
A result for the specified option, or null if it was not provided and no default was configured.
Applies to
GetResult(Command)
- Source:
- ParseResult.cs
Gets the result, if any, for the specified command.
public:
System::CommandLine::Parsing::CommandResult ^ GetResult(System::CommandLine::Command ^ command);
public System.CommandLine.Parsing.CommandResult? GetResult(System.CommandLine.Command command);
member this.GetResult : System.CommandLine.Command -> System.CommandLine.Parsing.CommandResult
Public Function GetResult (command As Command) As CommandResult
Parameters
- command
- Command
The command for which to find a result.
Returns
A result for the specified command, or null if it was not provided.
Applies to
GetResult(Argument)
- Source:
- ParseResult.cs
Gets the result, if any, for the specified argument.
public:
System::CommandLine::Parsing::ArgumentResult ^ GetResult(System::CommandLine::Argument ^ argument);
public System.CommandLine.Parsing.ArgumentResult? GetResult(System.CommandLine.Argument argument);
member this.GetResult : System.CommandLine.Argument -> System.CommandLine.Parsing.ArgumentResult
Public Function GetResult (argument As Argument) As ArgumentResult
Parameters
- argument
- Argument
The argument for which to find a result.
Returns
A result for the specified argument, or null if it was not provided and no default was configured.
Applies to
GetResult(Directive)
- Source:
- ParseResult.cs
Gets the result, if any, for the specified directive.
public:
System::CommandLine::Parsing::DirectiveResult ^ GetResult(System::CommandLine::Directive ^ directive);
public System.CommandLine.Parsing.DirectiveResult? GetResult(System.CommandLine.Directive directive);
member this.GetResult : System.CommandLine.Directive -> System.CommandLine.Parsing.DirectiveResult
Public Function GetResult (directive As Directive) As DirectiveResult
Parameters
- directive
- Directive
The directive for which to find a result.
Returns
A result for the specified directive, or null if it was not provided.