Compartir a través de


ConversationsExtensions.SendToConversationAsync Método

Definición

Sobrecargas

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

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

Enviar una actividad a una conversación.

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)

Parámetros

operations
IConversations

El grupo de operaciones de este método de extensión.

conversationId
String

Id. de conversación.

activity
Activity

Actividad que se va a enviar.

cancellationToken
CancellationToken

Token de cancelación.

Devoluciones

El parámetro de cadena de consulta ResourceResponse.

Comentarios

Este método permite enviar una actividad al final de una conversación.

Esto es ligeramente diferente de ReplyToActivity(). * SendToConversation(conversationId): anexará la actividad al final de la conversación según la marca de tiempo o la semántica del canal. * ReplyToActivity(conversationId,ActivityId): agrega la actividad como respuesta a otra actividad, si el canal lo admite. Si el canal no admite respuestas anidadas, ReplyToActivity vuelve a SendToConversation.

Use ReplyToActivity al responder a una actividad específica de la conversación.

Use SendToConversation en todos los demás casos.

Se aplica a

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)

Parámetros

operations
IConversations
conversationId
String
activity
Activity
cancellationToken
CancellationToken

Devoluciones

Se aplica a

SendToConversationAsync(IConversations, Activity, CancellationToken)

Enviar una actividad a una conversación.

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)

Parámetros

operations
IConversations

El grupo de operaciones de este método de extensión.

activity
Activity

Actividad que se va a enviar.

cancellationToken
CancellationToken

Token de cancelación.

Devoluciones

Tarea Task que representa la operación asincrónica.

Se aplica a

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)

Parámetros

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Devoluciones

Se aplica a