CommandLineParser.Parse メソッド

定義

オーバーロード

名前 説明
Parse(Command, IReadOnlyList<String>, ParserConfiguration)

引数の一覧を解析します。

Parse(Command, String, ParserConfiguration)

コマンド ライン文字列を解析します。

Parse(Command, IReadOnlyList<String>, ParserConfiguration)

ソース:
CommandLineParser.cs
ソース:
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)

ソース:
CommandLineParser.cs
ソース:
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

注釈

コマンド ライン文字列入力は、コマンド ラインで渡されたかのようにトークンに分割されます。

適用対象