Freigeben über


SkillHandler.OnReplyToActivityAsync Methode

Definition

ReplyToActivity()-API für Skill.

protected override 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);
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 Overrides 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

Konversations-ID.

activityId
String

activityId, an die die Antwort lautet (OPTIONAL).

activity
Activity

Zu sendende Aktivität.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Aufgabe für eine Ressourcenantwort.

Hinweise

Mit dieser Methode können Sie auf eine Aktivität 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: