Edit

Share via


CommandExtensions.Parse Method

Definition

Overloads

Parse(Command, String)

Parses a command line string value using the specified command.

Parse(Command, String[])

Parses an array strings using the specified command.

Parse(Command, String)

Source:
CommandExtensions.cs

Parses a command line string value using the specified command.

public static System.CommandLine.Parsing.ParseResult Parse(this System.CommandLine.Command command, string commandLine);

Parameters

command
Command

The command 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(Command, String[])

Source:
CommandExtensions.cs

Parses an array strings using the specified command.

public static System.CommandLine.Parsing.ParseResult Parse(this System.CommandLine.Command command, params string[] args);

Parameters

command
Command

The command to use to parse the command line input.

args
String[]

The string arguments to parse.

Returns

A parse result describing the outcome of the parse operation.

Applies to