Sprache

ChannelServiceHandlerBase.OnReplyToActivityAsync Methode

Definition

OnReplyToActivityAsync() API.

protected virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> OnReplyToActivityAsync(System.Security.Claims.ClaimsIdentity claimsIdentity, string conversationId, string activityId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member OnReplyToActivityAsync : System.Security.Claims.ClaimsIdentity * string * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
override this.OnReplyToActivityAsync : System.Security.Claims.ClaimsIdentity * string * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
Protected Overridable Function OnReplyToActivityAsync (claimsIdentity As ClaimsIdentity, conversationId As String, activityId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameter

claimsIdentity
ClaimsIdentity

claimsIdentity für den Bot sollte "AudienceClaim", "AppIdClaim" und "ServiceUrlClaim" aufweisen.

conversationId
String

Unterhaltungs-ID.

activityId
String

activityId, auf die die Antwort lautet (OPTIONAL).

activity
Activity

Zu sendende Aktivität.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Vorgang für eine Ressourcenantwort.

Hinweise

Überschreiben Sie diese Methode, um auf eine Aktivität zu antworten.

Dies unterscheidet sich geringfügig von SendToConversation(). * SendToConversation(conversationId) – fügt die Aktivität entsprechend dem Zeitstempel oder der Semantik des Kanals an das Ende der Unterhaltung an. * ReplyToActivity(conversationId,ActivityId) – fügt die Aktivität als Antwort auf eine andere Aktivität hinzu, wenn der Kanal sie unterstützt. Wenn der Kanal keine geschachtelten Antworten unterstützt, greift ReplyToActivity auf SendToConversation zurück.

Verwenden Sie ReplyToActivity, wenn Sie auf eine bestimmte Aktivität in der Unterhaltung antworten.

Verwenden Sie SendToConversation in allen anderen Fällen.

Gilt für: