SymbolResult.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(Directive) |
Finds a result for the specific directive anywhere in the parse tree. |
| GetResult(Option) |
Finds a result for the specific option anywhere in the parse tree, including parent and child symbol results. |
| GetResult(Argument) |
Finds a result for the specific argument anywhere in the parse tree, including parent and child symbol results. |
| GetResult(Command) |
Finds a result for the specific command anywhere in the parse tree, including parent and child symbol results. |
GetResult(String)
- Source:
- SymbolResult.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 argument result if the argument was matched by the parser or has a default value; otherwise, null.
Applies to
GetResult(Directive)
- Source:
- SymbolResult.cs
Finds a result for the specific directive anywhere in the parse tree.
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 directive result if the directive was matched by the parser, null otherwise.
Applies to
GetResult(Option)
- Source:
- SymbolResult.cs
Finds a result for the specific option anywhere in the parse tree, including parent and child symbol results.
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
An option result if the option was matched by the parser or has a default value; otherwise, null.
Applies to
GetResult(Argument)
- Source:
- SymbolResult.cs
Finds a result for the specific argument anywhere in the parse tree, including parent and child symbol results.
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
An argument result if the argument was matched by the parser or has a default value; otherwise, null.
Applies to
GetResult(Command)
- Source:
- SymbolResult.cs
Finds a result for the specific command anywhere in the parse tree, including parent and child symbol results.
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
An command result if the command was matched by the parser; otherwise, null.