BotFrameworkHttpAdapterBase.ProcessStreamingActivityAsync 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.
Primary adapter method for processing activities sent from streaming channel. Creates a turn context and runs the middleware pipeline for an incoming activity. Throws ArgumentNullException on null arguments.
public System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse> ProcessStreamingActivityAsync (Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.BotCallbackHandler callbackHandler, System.Threading.CancellationToken cancellationToken = default);
abstract member ProcessStreamingActivityAsync : Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
override this.ProcessStreamingActivityAsync : Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
Public Function ProcessStreamingActivityAsync (activity As Activity, callbackHandler As BotCallbackHandler, Optional cancellationToken As CancellationToken = Nothing) As Task(Of InvokeResponse)
Parameters
- callbackHandler
- BotCallbackHandler
The BotCallbackHandler that will handle the activity.
- 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. If the activity type was 'Invoke' and the corresponding key (channelId + activityId) was found then an InvokeResponse is returned, otherwise null is returned.
Implements
Remarks
Call this method to reactively send a message to a conversation. If the task completes successfully, then if the activity's Type is Invoke and the corresponding key (ChannelId + Id) is found then an InvokeResponse is returned, otherwise null is returned.
This method registers the following services for the turn.