Microsoft.Bot.Builder.Dialogs.Conversation Class Reference

The top level composition root for the SDK. More...

Static Public Member Functions

static async Task ResumeAsync (ResumptionCookie resumptionCookie, IActivity toBot, CancellationToken token=default(CancellationToken))
 Resume a conversation and post the data to the dialog waiting. More...
 
static async Task ResumeAsync (ConversationReference conversationReference, IActivity toBot, CancellationToken token=default(CancellationToken))
 Resume a conversation and post the data to the dialog waiting. More...
 
static async Task SendAsync (IMessageActivity toBot, Func< IDialog< object >> MakeRoot, CancellationToken token=default(CancellationToken))
 Process an incoming message within the conversation. More...
 

Static Public Attributes

static readonly IContainer Container
 

Detailed Description

The top level composition root for the SDK.

Definition at line 47 of file Microsoft.Bot.Builder.Autofac/Dialogs/Conversation.cs.

Member Function Documentation

static async Task Microsoft.Bot.Builder.Dialogs.Conversation.ResumeAsync ( ResumptionCookie  resumptionCookie,
IActivity  toBot,
CancellationToken  token = default(CancellationToken) 
)
inlinestatic

Resume a conversation and post the data to the dialog waiting.

Parameters
resumptionCookieThe resumption cookie.
toBotThe data sent to bot.
tokenThe cancellation token.
Returns
A task that represent the message to send back to the user after resumption of the conversation.

Definition at line 93 of file Microsoft.Bot.Builder.Autofac/Dialogs/Conversation.cs.

static async Task Microsoft.Bot.Builder.Dialogs.Conversation.ResumeAsync ( ConversationReference  conversationReference,
IActivity  toBot,
CancellationToken  token = default(CancellationToken) 
)
inlinestatic

Resume a conversation and post the data to the dialog waiting.

Parameters
conversationReferenceThe resumption cookie.
toBotThe data sent to bot.
tokenThe cancellation token.
Returns
A task that represent the message to send back to the user after resumption of the conversation.

Definition at line 106 of file Microsoft.Bot.Builder.Autofac/Dialogs/Conversation.cs.

static async Task Microsoft.Bot.Builder.Dialogs.Conversation.SendAsync ( IMessageActivity  toBot,
Func< IDialog< object >>  MakeRoot,
CancellationToken  token = default(CancellationToken) 
)
inlinestatic

Process an incoming message within the conversation.

This method:

  1. Instantiates and composes the required components.
  2. Deserializes the dialog state (the dialog stack and each dialog's state) from the toBot IMessageActivity.
  3. Resumes the conversation processes where the dialog suspended to wait for a IMessageActivity.
  4. Queues IMessageActivitys to be sent to the user.
  5. Serializes the updated dialog state in the messages to be sent to the user.

The MakeRoot factory method is invoked for new conversations only, because existing conversations have the dialog stack and state serialized in the IMessageActivity data.

Parameters
toBotThe message sent to the bot.
MakeRootThe factory method to make the root dialog.
tokenThe cancellation token.
Returns
A task that represents the message to send inline back to the user.

Definition at line 76 of file Microsoft.Bot.Builder.Autofac/Dialogs/Conversation.cs.

Member Data Documentation

readonly IContainer Microsoft.Bot.Builder.Dialogs.Conversation.Container
static

The documentation for this class was generated from the following file: