OptionExtensions.Parse 方法

定义

重载

Parse(Option, String)

使用 选项分析命令行字符串值。

Parse(Option, String[])

使用 选项分析命令行字符串值。

Parse(Option, String)

使用 选项分析命令行字符串值。

public:
[System::Runtime::CompilerServices::Extension]
 static System::CommandLine::Parsing::ParseResult ^ Parse(System::CommandLine::Option ^ option, System::String ^ commandLine);
public static System.CommandLine.Parsing.ParseResult Parse (this System.CommandLine.Option option, string commandLine);
static member Parse : System.CommandLine.Option * string -> System.CommandLine.Parsing.ParseResult
<Extension()>
Public Function Parse (option As Option, commandLine As String) As ParseResult

参数

option
Option

用于分析命令行输入的选项。

commandLine
String

要分析的命令行字符串,可以包含等效于可输入到终端的内容的空格和引号。

返回

描述分析操作结果的解析结果。

注解

命令行字符串输入将拆分为标记,就像在命令行上传递一样。

适用于

Parse(Option, String[])

使用 选项分析命令行字符串值。

public:
[System::Runtime::CompilerServices::Extension]
 static System::CommandLine::Parsing::ParseResult ^ Parse(System::CommandLine::Option ^ option, cli::array <System::String ^> ^ args);
public static System.CommandLine.Parsing.ParseResult Parse (this System.CommandLine.Option option, string[] args);
static member Parse : System.CommandLine.Option * string[] -> System.CommandLine.Parsing.ParseResult
<Extension()>
Public Function Parse (option As Option, args As String()) As ParseResult

参数

option
Option

用于分析命令行输入的选项。

args
String[]

要分析的字符串选项。

返回

描述分析操作结果的解析结果。

适用于