BotAdapter.ProcessActivityAsync Method

Definition

Creates a turn context and runs the middleware pipeline for an incoming TRUSTED activity.

public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse> ProcessActivityAsync (System.Security.Claims.ClaimsIdentity claimsIdentity, Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.BotCallbackHandler callback, System.Threading.CancellationToken cancellationToken);
abstract member ProcessActivityAsync : System.Security.Claims.ClaimsIdentity * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
override this.ProcessActivityAsync : System.Security.Claims.ClaimsIdentity * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
Public Overridable Function ProcessActivityAsync (claimsIdentity As ClaimsIdentity, activity As Activity, callback As BotCallbackHandler, cancellationToken As CancellationToken) As Task(Of InvokeResponse)

Parameters

claimsIdentity
ClaimsIdentity

A ClaimsIdentity for the request.

activity
Activity

The incoming activity.

callback
BotCallbackHandler

The code to run at the end of the adapter's middleware pipeline.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Applies to