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

调用期间输出写入到的控制台。

返回

调用的退出代码。

适用于