Command.Parse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Parse(IReadOnlyList<String>, ParserConfiguration) |
Parses an array strings using the command. |
| Parse(String, ParserConfiguration) |
Parses a command line string value using the command. |
Parse(IReadOnlyList<String>, ParserConfiguration)
- Source:
- Command.cs
Parses an array strings using the command.
public System.CommandLine.ParseResult Parse(System.Collections.Generic.IReadOnlyList<string> args, System.CommandLine.ParserConfiguration? configuration = default);
member this.Parse : System.Collections.Generic.IReadOnlyList<string> * System.CommandLine.ParserConfiguration -> System.CommandLine.ParseResult
Public Function Parse (args As IReadOnlyList(Of String), Optional configuration As ParserConfiguration = Nothing) As ParseResult
Parameters
- args
- IReadOnlyList<String>
The string arguments to parse.
- configuration
- ParserConfiguration
The configuration on which the parser's grammar and behaviors are based.
Returns
A parse result describing the outcome of the parse operation.
Applies to
Parse(String, ParserConfiguration)
- Source:
- Command.cs
Parses a command line string value using the command.
public System.CommandLine.ParseResult Parse(string commandLine, System.CommandLine.ParserConfiguration? configuration = default);
member this.Parse : string * System.CommandLine.ParserConfiguration -> System.CommandLine.ParseResult
Public Function Parse (commandLine As String, Optional configuration As ParserConfiguration = Nothing) As ParseResult
Parameters
- commandLine
- String
A command line string to parse, which can include spaces and quotes equivalent to what can be entered into a terminal.
- configuration
- ParserConfiguration
The configuration on which the parser's grammar and behaviors are based.
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.