共用方式為


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

在叫用期間寫入輸出的控制台。

傳回

調用的結束代碼。

適用於