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[]

要剖析的字串自變數。

傳回

描述剖析作業結果的剖析結果。

適用於