TestAdapter.ProcessActivityAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ProcessActivityAsync(Activity, BotCallbackHandler, CancellationToken) |
Receives an activity and runs it through the middleware pipeline. |
ProcessActivityAsync(ClaimsIdentity, Activity, BotCallbackHandler, CancellationToken) |
Creates a turn context and runs the middleware pipeline for an incoming activity. |
ProcessActivityAsync(Activity, BotCallbackHandler, CancellationToken)
Receives an activity and runs it through the middleware pipeline.
public System.Threading.Tasks.Task ProcessActivityAsync (Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.BotCallbackHandler callback, System.Threading.CancellationToken cancellationToken = default);
override this.ProcessActivityAsync : Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ProcessActivityAsync (activity As Activity, callback As BotCallbackHandler, Optional cancellationToken As CancellationToken = Nothing) As Task
Parameters
- activity
- Activity
The activity to process.
- callback
- BotCallbackHandler
The bot logic to invoke.
- 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
ProcessActivityAsync(ClaimsIdentity, Activity, BotCallbackHandler, CancellationToken)
Creates a turn context and runs the middleware pipeline for an incoming activity.
public override 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);
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 Overrides 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.