IConversations.ReplyToActivityWithHttpMessagesAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ReplyToActivityWithHttpMessagesAsync(String, String, Activity, Dictionary<String,List<String>>, CancellationToken)
ReplyToActivity。
public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>> ReplyToActivityWithHttpMessagesAsync (string conversationId, string activityId, Microsoft.Bot.Schema.Activity activity, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplyToActivityWithHttpMessagesAsync : string * string * Microsoft.Bot.Schema.Activity * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>>
Public Function ReplyToActivityWithHttpMessagesAsync (conversationId As String, activityId As String, activity As Activity, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ResourceResponse))
参数
- conversationId
- String
对话 ID。
- activityId
- String
activityId 答复 (OPTIONAL) 。
- activity
- Activity
要发送的活动。
- customHeaders
- Dictionary<String,List<String>>
将添加到请求的标头。
- cancellationToken
- CancellationToken
取消标记。
返回
一个表示 Microsoft.Rest.HttpOperationResponse的任务。
例外
操作返回无效状态代码时引发。
Microsoft.Rest.SerializationException
无法反序列化响应时引发。
Microsoft.Rest.ValidationException
当所需的参数为 null 时引发。
注解
此方法允许回复活动。
这与 SendToConversation () 略有不同。 * SendToConversation (conversationId) - 将根据通道的时间戳或语义将活动追加到会话的末尾。 * ReplyToActivity (conversationId,ActivityId) - 将活动作为回复添加到另一个活动(如果通道支持)。 如果通道不支持嵌套答复,则 ReplyToActivity 将回退到 SendToConversation。
回复对话中的特定活动时,请使用 ReplyToActivity。
在所有其他情况下使用 SendToConversation。
适用于
ReplyToActivityWithHttpMessagesAsync(String, String, Activity, Dictionary<String,List<String>>, CancellationToken)
public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>> ReplyToActivityWithHttpMessagesAsync (string conversationId, string activityId, Microsoft.Bot.Connector.Activity activity, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplyToActivityWithHttpMessagesAsync : string * string * Microsoft.Bot.Connector.Activity * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>>
Public Function ReplyToActivityWithHttpMessagesAsync (conversationId As String, activityId As String, activity As Activity, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ResourceResponse))
参数
- conversationId
- String
- activityId
- String
- activity
- Activity
- customHeaders
- Dictionary<String,List<String>>
- cancellationToken
- CancellationToken