Share via


BotFrameworkAdapter.ContinueConversationAsync Method

Definition

Overloads

ContinueConversationAsync(ClaimsIdentity, ConversationReference, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

ContinueConversationAsync(String, ConversationReference, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

ContinueConversationAsync(ClaimsIdentity, ConversationReference, String, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

ContinueConversationAsync(ClaimsIdentity, ConversationReference, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

public override System.Threading.Tasks.Task ContinueConversationAsync (System.Security.Claims.ClaimsIdentity claimsIdentity, Microsoft.Bot.Schema.ConversationReference reference, Microsoft.Bot.Builder.BotCallbackHandler callback, System.Threading.CancellationToken cancellationToken);
override this.ContinueConversationAsync : System.Security.Claims.ClaimsIdentity * Microsoft.Bot.Schema.ConversationReference * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function ContinueConversationAsync (claimsIdentity As ClaimsIdentity, reference As ConversationReference, callback As BotCallbackHandler, cancellationToken As CancellationToken) As Task

Parameters

claimsIdentity
ClaimsIdentity

A ClaimsIdentity for the conversation.

reference
ConversationReference

A reference to the conversation to continue.

callback
BotCallbackHandler

The method to call for the resulting bot turn.

cancellationToken
CancellationToken

Cancellation token.

Returns

A task that represents the work queued to execute.

Remarks

Call this method to proactively send a message to a conversation. Most _channels require a user to initialize a conversation with a bot before the bot can send activities to the user.

This method registers the following services for the turn.

  • IIdentity (key = "BotIdentity"), a claims claimsIdentity for the bot.
  • IConnectorClient, the channel connector client to use this turn.

See also

Applies to

ContinueConversationAsync(String, ConversationReference, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

public override System.Threading.Tasks.Task ContinueConversationAsync (string botAppId, Microsoft.Bot.Schema.ConversationReference reference, Microsoft.Bot.Builder.BotCallbackHandler callback, System.Threading.CancellationToken cancellationToken);
override this.ContinueConversationAsync : string * Microsoft.Bot.Schema.ConversationReference * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function ContinueConversationAsync (botAppId As String, reference As ConversationReference, callback As BotCallbackHandler, cancellationToken As CancellationToken) As Task

Parameters

botAppId
String

The application ID of the bot. This is the appId returned by Portal registration, and is generally found in the "MicrosoftAppId" parameter in appSettings.json.

reference
ConversationReference

A reference to the conversation to continue.

callback
BotCallbackHandler

The method to call for the resulting bot turn.

cancellationToken
CancellationToken

Cancellation token.

Returns

A task that represents the work queued to execute.

Implements

Exceptions

botAppId, reference, or callback is null.

Remarks

Call this method to proactively send a message to a conversation. Most _channels require a user to initialize a conversation with a bot before the bot can send activities to the user.

This method registers the following services for the turn.

  • IIdentity (key = "BotIdentity"), a claims claimsIdentity for the bot.
  • IConnectorClient, the channel connector client to use this turn.

This overload differs from the Node implementation by requiring the BotId to be passed in. The .Net code allows multiple bots to be hosted in a single adapter which isn't something supported by Node.

See also

Applies to

ContinueConversationAsync(ClaimsIdentity, ConversationReference, String, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

public override System.Threading.Tasks.Task ContinueConversationAsync (System.Security.Claims.ClaimsIdentity claimsIdentity, Microsoft.Bot.Schema.ConversationReference reference, string audience, Microsoft.Bot.Builder.BotCallbackHandler callback, System.Threading.CancellationToken cancellationToken);
override this.ContinueConversationAsync : System.Security.Claims.ClaimsIdentity * Microsoft.Bot.Schema.ConversationReference * string * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function ContinueConversationAsync (claimsIdentity As ClaimsIdentity, reference As ConversationReference, audience As String, callback As BotCallbackHandler, cancellationToken As CancellationToken) As Task

Parameters

claimsIdentity
ClaimsIdentity

A ClaimsIdentity for the conversation.

reference
ConversationReference

A reference to the conversation to continue.

audience
String

The target audience for the connector.

callback
BotCallbackHandler

The method to call for the resulting bot turn.

cancellationToken
CancellationToken

Cancellation token.

Returns

A task that represents the work queued to execute.

Applies to