Język

CommandLineParser.Parse Metoda

Definicja

Analizuje listę argumentów.

Przeciążenia

Parse(IReadOnlyList<String>, String)

public override System.CommandLine.ParseResult Parse(System.Collections.Generic.IReadOnlyList<string> arguments, string rawInput = default);
override this.Parse : System.Collections.Generic.IReadOnlyList<string> * string -> System.CommandLine.ParseResult
Public Overrides Function Parse (arguments As IReadOnlyList(Of String), Optional rawInput As String = Nothing) As ParseResult

Parametry

arguments
IReadOnlyList<String>
rawInput
String

Zwraca

Dotyczy

Parse(Command, IReadOnlyList<String>, ParserConfiguration)

Źródło:
CommandLineParser.cs
Źródło:
CommandLineParser.cs

Analizuje listę argumentów.

public static System.CommandLine.ParseResult Parse(System.CommandLine.Command command, System.Collections.Generic.IReadOnlyList<string> args, System.CommandLine.ParserConfiguration? configuration = default);
static member Parse : System.CommandLine.Command * System.Collections.Generic.IReadOnlyList<string> * System.CommandLine.ParserConfiguration -> System.CommandLine.ParseResult
Public Shared Function Parse (command As Command, args As IReadOnlyList(Of String), Optional configuration As ParserConfiguration = Nothing) As ParseResult

Parametry

command
Command

Polecenie używane do analizowania danych wejściowych wiersza polecenia.

args
IReadOnlyList<String>

Tablica ciągów zwykle przekazywana Main do metody programu.

configuration
ParserConfiguration

Konfiguracja, na której opiera się gramatyka i zachowania analizatora.

Zwraca

Podaj ParseResult szczegółowe informacje o operacji analizy.

Dotyczy

Parse(Command, String, ParserConfiguration)

Źródło:
CommandLineParser.cs
Źródło:
CommandLineParser.cs

Analizuje ciąg wiersza polecenia.

public static System.CommandLine.ParseResult Parse(System.CommandLine.Command command, string commandLine, System.CommandLine.ParserConfiguration? configuration = default);
static member Parse : System.CommandLine.Command * string * System.CommandLine.ParserConfiguration -> System.CommandLine.ParseResult
Public Shared Function Parse (command As Command, commandLine As String, Optional configuration As ParserConfiguration = Nothing) As ParseResult

Parametry

command
Command

Polecenie używane do analizowania danych wejściowych wiersza polecenia.

commandLine
String

Pełne dane wejściowe wiersza polecenia przed podziałem i tokenizacją. Te dane wejściowe nie są zwykle dostępne, gdy analizator jest wywoływany z Program.Main. Jest on używany głównie podczas obliczania uzupełniania za pomocą dotnet-suggest narzędzia.

configuration
ParserConfiguration

Konfiguracja, na której opiera się gramatyka i zachowania analizatora.

Zwraca

Podaj ParseResult szczegółowe informacje o operacji analizy.

Uwagi

Dane wejściowe ciągu wiersza polecenia zostaną podzielone na tokeny tak, jakby zostały przekazane w wierszu polecenia.

Dotyczy