CommandExtensions.Invoke 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
在叫用期間寫入輸出的控制台。
傳回
調用的結束代碼。