TeamsActivityHandler.OnTeamsMessagingExtensionQueryAsync 方法

定义

从连接器接收消息传送扩展查询活动时调用。

protected virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResponse> OnTeamsMessagingExtensionQueryAsync (Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> turnContext, Microsoft.Bot.Schema.Teams.MessagingExtensionQuery query, System.Threading.CancellationToken cancellationToken);
abstract member OnTeamsMessagingExtensionQueryAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> * Microsoft.Bot.Schema.Teams.MessagingExtensionQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResponse>
override this.OnTeamsMessagingExtensionQueryAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> * Microsoft.Bot.Schema.Teams.MessagingExtensionQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResponse>
Protected Overridable Function OnTeamsMessagingExtensionQueryAsync (turnContext As ITurnContext(Of IInvokeActivity), query As MessagingExtensionQuery, cancellationToken As CancellationToken) As Task(Of MessagingExtensionResponse)

参数

turnContext
ITurnContext<IInvokeActivity>

此轮次的强类型上下文对象。

query
MessagingExtensionQuery

搜索命令的查询。

cancellationToken
CancellationToken

可由其他对象或线程用以接收取消通知的取消标记。

返回

查询的消息传送扩展响应。

适用于