Dela via


ConversationsExtensions.SendToConversationAsync Metod

Definition

Överlagringar

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

SendToConversationAsync(IConversations, String, Activity, CancellationToken)
SendToConversationAsync(IConversations, Activity, CancellationToken)

Skicka en aktivitet till en konversation.

SendToConversationAsync(IConversations, Activity, CancellationToken)

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametrar

operations
IConversations

Åtgärdsgruppen för den här tilläggsmetoden.

conversationId
String

Konversations-ID.

activity
Activity

Aktivitet att skicka.

cancellationToken
CancellationToken

Annulleringstoken.

Returer

ResourceResponse.

Kommentarer

Med den här metoden kan du skicka en aktivitet till slutet av en konversation.

Detta skiljer sig något från ReplyToActivity(). * SendToConversation(conversationId) – lägger till aktiviteten i slutet av konversationen enligt tidsstämpeln eller semantiken i kanalen. * ReplyToActivity(conversationId,ActivityId) – lägger till aktiviteten som ett svar på en annan aktivitet, om kanalen stöder den. Om kanalen inte stöder kapslade svar återgår ReplyToActivity till SendToConversation.

Använd ReplyToActivity när du svarar på en specifik aktivitet i konversationen.

Använd SendToConversation i alla andra fall.

Gäller för

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametrar

operations
IConversations
conversationId
String
activity
Activity
cancellationToken
CancellationToken

Returer

Gäller för

SendToConversationAsync(IConversations, Activity, CancellationToken)

Skicka en aktivitet till en konversation.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametrar

operations
IConversations

Åtgärdsgruppen för den här tilläggsmetoden.

activity
Activity

Aktivitet att skicka.

cancellationToken
CancellationToken

Annulleringstoken.

Returer

En Task som representerar den asynkrona åtgärden.

Gäller för

SendToConversationAsync(IConversations, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametrar

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Returer

Gäller för