CommandExtensions.Parse 方法

定义

重载

Parse(Command, String)

使用指定的命令分析命令行字符串值。

Parse(Command, String[])

使用指定的命令分析数组字符串。

Parse(Command, String)

使用指定的命令分析命令行字符串值。

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

参数

command
Command

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

commandLine
String

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

返回

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

注解

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

适用于

Parse(Command, String[])

使用指定的命令分析数组字符串。

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

参数

command
Command

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

args
String[]

要分析的字符串参数。

返回

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

适用于