次の方法で共有


CommandExtensions.Invoke メソッド

定義

オーバーロード

Invoke(Command, String, IConsole)

コマンドを解析して呼び出します。

Invoke(Command, String[], IConsole)

コマンドを解析して呼び出します。

Invoke(Command, String, IConsole)

コマンドを解析して呼び出します。

public static int Invoke (this System.CommandLine.Command command, string commandLine, System.CommandLine.IConsole? console = default);
static member Invoke : System.CommandLine.Command * string * System.CommandLine.IConsole -> int
<Extension()>
Public Function Invoke (command As Command, commandLine As String, Optional console As IConsole = Nothing) As Integer

パラメーター

command
Command

呼び出すコマンド。

commandLine
String

解析するコマンド ライン。

console
IConsole

呼び出し中に出力が書き込まれるコンソール。

戻り値

呼び出しの終了コード。

注釈

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

適用対象

Invoke(Command, String[], IConsole)

コマンドを解析して呼び出します。

public static int Invoke (this System.CommandLine.Command command, string[] args, System.CommandLine.IConsole? console = default);
static member Invoke : System.CommandLine.Command * string[] * System.CommandLine.IConsole -> int
<Extension()>
Public Function Invoke (command As Command, args As String(), Optional console As IConsole = Nothing) As Integer

パラメーター

command
Command

呼び出すコマンド。

args
String[]

解析する引数。

console
IConsole

呼び出し中に出力が書き込まれるコンソール。

戻り値

呼び出しの終了コード。

適用対象