언어

CommandLineParser.Parse 메서드

정의

인수 목록을 구문 분석합니다.

오버로드

속성 Description
Parse(IReadOnlyList<String>, String)
Parse(Command, IReadOnlyList<String>, ParserConfiguration)

인수 목록을 구문 분석합니다.

Parse(Command, String, ParserConfiguration)

명령줄 문자열을 구문 분석합니다.

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

매개 변수

arguments
IReadOnlyList<String>
rawInput
String

반품

적용 대상

Parse(Command, IReadOnlyList<String>, ParserConfiguration)

Source:
CommandLineParser.cs
Source:
CommandLineParser.cs

인수 목록을 구문 분석합니다.

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

매개 변수

command
Command

명령줄 입력을 구문 분석하는 데 사용할 명령입니다.

args
IReadOnlyList<String>

일반적으로 프로그램의 메서드에 전달되는 문자열 배열입니다 Main .

configuration
ParserConfiguration

파서의 문법 및 동작을 기반으로 하는 구성입니다.

반품

ParseResult 구문 분석 작업에 대한 자세한 정보입니다.

적용 대상

Parse(Command, String, ParserConfiguration)

Source:
CommandLineParser.cs
Source:
CommandLineParser.cs

명령줄 문자열을 구문 분석합니다.

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

매개 변수

command
Command

명령줄 입력을 구문 분석하는 데 사용할 명령입니다.

commandLine
String

분할 및 토큰화 전에 전체 명령줄 입력입니다. 이 입력은 일반적으로 파서가 호출 Program.Main되는 경우 사용할 수 없습니다. 이 도구는 주로 도구를 통해 dotnet-suggest 완성을 계산할 때 사용됩니다.

configuration
ParserConfiguration

파서의 문법 및 동작을 기반으로 하는 구성입니다.

반품

ParseResult 구문 분석 작업에 대한 자세한 정보입니다.

설명

명령줄 문자열 입력은 명령줄에 전달된 것처럼 토큰으로 분할됩니다.

적용 대상