ConversationsExtensions.CreateDirectConversationAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateDirectConversationAsync(IConversations, ChannelAccount, ChannelAccount, Activity, CancellationToken)
public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ConversationResourceResponse> CreateDirectConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.ChannelAccount bot, Microsoft.Bot.Connector.ChannelAccount user, Microsoft.Bot.Connector.Activity activity = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateDirectConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.ChannelAccount * Microsoft.Bot.Connector.ChannelAccount * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ConversationResourceResponse>
<Extension()>
Public Function CreateDirectConversationAsync (operations As IConversations, bot As ChannelAccount, user As ChannelAccount, Optional activity As Activity = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ConversationResourceResponse)
参数
- operations
- IConversations
- bot
- ChannelAccount
- user
- ChannelAccount
- activity
- Activity
- cancellationToken
- CancellationToken
返回
适用于
CreateDirectConversationAsync(IConversations, ChannelAccount, ChannelAccount, Activity, CancellationToken)
在机器人和用户之间创建新的直接对话。
public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationResourceResponse> CreateDirectConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.ChannelAccount bot, Microsoft.Bot.Schema.ChannelAccount user, Microsoft.Bot.Schema.Activity activity = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateDirectConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.ChannelAccount * Microsoft.Bot.Schema.ChannelAccount * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationResourceResponse>
<Extension()>
Public Function CreateDirectConversationAsync (operations As IConversations, bot As ChannelAccount, user As ChannelAccount, Optional activity As Activity = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ConversationResourceResponse)
参数
- operations
- IConversations
此扩展方法的操作组。
- bot
- ChannelAccount
要从中创建聊天的机器人。
- user
- ChannelAccount
要与之创建对话的用户。
- activity
- Activity
(OPTIONAL) 要发送到新对话的初始消息。
- cancellationToken
- CancellationToken
取消标记。
返回
表示异步操作的 Task。
适用于
CreateDirectConversationAsync(IConversations, String, String, Activity, CancellationToken)
public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ConversationResourceResponse> CreateDirectConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string botAddress, string userAddress, Microsoft.Bot.Connector.Activity activity = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateDirectConversationAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ConversationResourceResponse>
<Extension()>
Public Function CreateDirectConversationAsync (operations As IConversations, botAddress As String, userAddress As String, Optional activity As Activity = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ConversationResourceResponse)
参数
- operations
- IConversations
- botAddress
- String
- userAddress
- String
- activity
- Activity
- cancellationToken
- CancellationToken
返回
适用于
CreateDirectConversationAsync(IConversations, String, String, Activity, CancellationToken)
在机器人和用户之间创建新的直接对话。
public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationResourceResponse> CreateDirectConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string botAddress, string userAddress, Microsoft.Bot.Schema.Activity activity = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateDirectConversationAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ConversationResourceResponse>
<Extension()>
Public Function CreateDirectConversationAsync (operations As IConversations, botAddress As String, userAddress As String, Optional activity As Activity = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ConversationResourceResponse)
参数
- operations
- IConversations
此扩展方法的操作组。
- botAddress
- String
要从中创建聊天的机器人。
- userAddress
- String
要与之创建对话的用户。
- activity
- Activity
(OPTIONAL) 要发送到新对话的初始消息。
- cancellationToken
- CancellationToken
取消标记。
返回
表示异步操作的 Task。