Επεξεργασία

Κοινή χρήση μέσω


OptionExtensions.Parse Method

Definition

Overloads

Parse(Option, String)

Parses a command line string value using an option.

Parse(Option, String[])

Parses a command line string value using an option.

Parse(Option, String)

Parses a command line string value using an option.

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

Parameters

option
Option

The option to use to parse the command line input.

commandLine
String

A command line string to parse, which can include spaces and quotes equivalent to what can be entered into a terminal.

Returns

A parse result describing the outcome of the parse operation.

Remarks

The command line string input will be split into tokens as if it had been passed on the command line.

Applies to

Parse(Option, String[])

Parses a command line string value using an option.

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

Parameters

option
Option

The option to use to parse the command line input.

args
String[]

The string options to parse.

Returns

A parse result describing the outcome of the parse operation.

Applies to