Nyelv

CommandLineParser.Parse Metódus

Definíció

Az argumentumok listáját elemzi.

Túlterhelések

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

Paraméterek

arguments
IReadOnlyList<String>
rawInput
String

Válaszok

A következőre érvényes:

Parse(Command, IReadOnlyList<String>, ParserConfiguration)

Forrás:
CommandLineParser.cs
Forrás:
CommandLineParser.cs

Az argumentumok listáját elemzi.

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

Paraméterek

command
Command

A parancssori bemenet elemzéséhez használandó parancs.

args
IReadOnlyList<String>

A sztringtömb általában egy program metódusának Main lett átadva.

configuration
ParserConfiguration

Az a konfiguráció, amelyen az elemző nyelvtana és viselkedése alapul.

Válaszok

Az ParseResult elemzési művelet részleteinek megadása.

A következőre érvényes:

Parse(Command, String, ParserConfiguration)

Forrás:
CommandLineParser.cs
Forrás:
CommandLineParser.cs

Egy parancssori sztring elemzése.

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

Paraméterek

command
Command

A parancssori bemenet elemzéséhez használandó parancs.

commandLine
String

A teljes parancssori bemenet a felosztás és a tokenizálás előtt. Ez a bemenet általában nem érhető el, ha a rendszer meghívja az elemzőt.Program.Main Elsősorban a befejezések eszközön keresztüli dotnet-suggest kiszámításához használatos.

configuration
ParserConfiguration

Az a konfiguráció, amelyen az elemző nyelvtana és viselkedése alapul.

Válaszok

Az ParseResult elemzési művelet részleteinek megadása.

Megjegyzések

A parancssori sztring bemenete jogkivonatokra lesz felosztva, mintha a parancssorban lett volna átadva.

A következőre érvényes: