ParseResult.FindResultFor 方法

定义

重载

FindResultFor(Argument)

获取指定参数的结果(如果有)。

FindResultFor(Command)

获取指定命令的结果(如果有)。

FindResultFor(Option)

获取指定选项的结果(如果有)。

FindResultFor(Symbol)

获取指定符号的结果(如果有)。

FindResultFor(Argument)

获取指定参数的结果(如果有)。

public:
 System::CommandLine::Parsing::ArgumentResult ^ FindResultFor(System::CommandLine::Argument ^ argument);
public System.CommandLine.Parsing.ArgumentResult? FindResultFor (System.CommandLine.Argument argument);
member this.FindResultFor : System.CommandLine.Argument -> System.CommandLine.Parsing.ArgumentResult
Public Function FindResultFor (argument As Argument) As ArgumentResult

参数

argument
Argument

要查找其结果的参数。

返回

指定参数的结果,如果未 null 提供且未配置默认值,则为 。

适用于

FindResultFor(Command)

获取指定命令的结果(如果有)。

public:
 System::CommandLine::Parsing::CommandResult ^ FindResultFor(System::CommandLine::Command ^ command);
public System.CommandLine.Parsing.CommandResult? FindResultFor (System.CommandLine.Command command);
member this.FindResultFor : System.CommandLine.Command -> System.CommandLine.Parsing.CommandResult
Public Function FindResultFor (command As Command) As CommandResult

参数

command
Command

要查找其结果的命令。

返回

指定命令的结果,如果未 null 提供,则为 。

适用于

FindResultFor(Option)

获取指定选项的结果(如果有)。

public:
 System::CommandLine::Parsing::OptionResult ^ FindResultFor(System::CommandLine::Option ^ option);
public System.CommandLine.Parsing.OptionResult? FindResultFor (System.CommandLine.Option option);
member this.FindResultFor : System.CommandLine.Option -> System.CommandLine.Parsing.OptionResult
Public Function FindResultFor (option As Option) As OptionResult

参数

option
Option

要查找结果的选项。

返回

指定选项的结果,如果未 null 提供且未配置默认值,则为 。

适用于

FindResultFor(Symbol)

获取指定符号的结果(如果有)。

public:
 System::CommandLine::Parsing::SymbolResult ^ FindResultFor(System::CommandLine::Symbol ^ symbol);
public System.CommandLine.Parsing.SymbolResult? FindResultFor (System.CommandLine.Symbol symbol);
member this.FindResultFor : System.CommandLine.Symbol -> System.CommandLine.Parsing.SymbolResult
Public Function FindResultFor (symbol As Symbol) As SymbolResult

参数

symbol
Symbol

要查找其结果的符号。

返回

指定符号的结果,或者 null 如果未提供且未配置默认值,则为 。

适用于