Share via


ICommandHandler.InvokeAsync(InvocationContext) 方法

定义

在命令行上调用关联的命令时执行操作。

public:
 System::Threading::Tasks::Task<int> ^ InvokeAsync(System::CommandLine::Invocation::InvocationContext ^ context);
public System.Threading.Tasks.Task<int> InvokeAsync (System.CommandLine.Invocation.InvocationContext context);
abstract member InvokeAsync : System.CommandLine.Invocation.InvocationContext -> System.Threading.Tasks.Task<int>
Public Function InvokeAsync (context As InvocationContext) As Task(Of Integer)

参数

context
InvocationContext

为调用提供上下文,包括分析结果和绑定支持。

返回

一个值,该值可用作进程的退出代码。

适用于