Microsoft.Bot.Builder.Dialogs.IDialogContext Interface Reference

The context for the execution of a dialog's conversational process. More...

Inheritance diagram for Microsoft.Bot.Builder.Dialogs.IDialogContext:

Public Member Functions

void Call< R > (IDialog< R > child, ResumeAfter< R > resume)
 Call a child dialog and add it to the top of the stack. More...
 
void Done< R > (R value)
 Complete the current dialog and return a result to the parent dialog. More...
 
void Fail (Exception error)
 Fail the current dialog and return an exception to the parent dialog. More...
 
Task FlushAsync (CancellationToken cancellationToken)
 Flushes the bot data to IBotDataStore<T> More...
 
Task Forward< R, T > (IDialog< R > child, ResumeAfter< R > resume, T item, CancellationToken token)
 Call a child dialog, add it to the top of the stack and post the item to the child dialog. More...
 
Task LoadAsync (CancellationToken cancellationToken)
 Loads the bot data from IBotDataStore<T> More...
 
IMessageActivity MakeMessage ()
 Make a message. More...
 
void Post< E > (E @event, ResumeAfter< E > resume)
 Post an internal event to the queue. More...
 
Task PostAsync (IMessageActivity message, CancellationToken cancellationToken=default(CancellationToken))
 Post a message to be sent to the user. More...
 
void Reset ()
 Resets the stack. More...
 
void Wait< R > (ResumeAfter< R > resume)
 Suspend the current dialog until an external event has been sent to the bot. More...
 

Properties

IActivity Activity [get]
 The activity posted to bot. More...
 
CancellationToken CancellationToken [get]
 
IBotDataBag ConversationData [get]
 Private bot data associated with a conversation. More...
 
IReadOnlyList< Delegate > Frames [get]
 The dialog frames active on the stack. More...
 
IBotDataBag PrivateConversationData [get]
 Private bot data associated with a user in a conversation. More...
 
IBotDataBag UserData [get]
 Private bot data associated with a user (across all channels and conversations). More...
 

Detailed Description

The context for the execution of a dialog's conversational process.

Definition at line 81 of file IDialogContext.cs.

Member Function Documentation

void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Call< R > ( IDialog< R >  child,
ResumeAfter< R >  resume 
)
inherited

Call a child dialog and add it to the top of the stack.

Template Parameters
RThe type of result expected from the child dialog.
Parameters
childThe child dialog.
resumeThe method to resume when the child dialog has completed.
void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Done< R > ( value)
inherited

Complete the current dialog and return a result to the parent dialog.

Template Parameters
RThe type of the result dialog.
Parameters
valueThe value of the result.
void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Fail ( Exception  error)
inherited

Fail the current dialog and return an exception to the parent dialog.

Parameters
errorThe error.
Task Microsoft.Bot.Builder.Dialogs.Internals.IBotData.FlushAsync ( CancellationToken  cancellationToken)
inherited

Flushes the bot data to IBotDataStore<T>

Parameters
cancellationTokenThe cancellation token.

Implemented in Microsoft.Bot.Builder.Dialogs.Internals.BotDataBase< T >, and Microsoft.Bot.Builder.Dialogs.Internals.DialogTaskManagerBotDataLoader.

Task Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Forward< R, T > ( IDialog< R >  child,
ResumeAfter< R >  resume,
item,
CancellationToken  token 
)
inherited

Call a child dialog, add it to the top of the stack and post the item to the child dialog.

Template Parameters
RThe type of result expected from the child dialog.
TThe type of the item posted to child dialog.
Parameters
childThe child dialog.
resumeThe method to resume when the child dialog has completed.
itemThe item that will be posted to child dialog.
tokenA cancellation token.
Returns
A task representing the Forward operation.
Task Microsoft.Bot.Builder.Dialogs.Internals.IBotData.LoadAsync ( CancellationToken  cancellationToken)
inherited

Loads the bot data from IBotDataStore<T>

Parameters
cancellationTokenThe cancellation token.

Implemented in Microsoft.Bot.Builder.Dialogs.Internals.BotDataBase< T >, and Microsoft.Bot.Builder.Dialogs.Internals.DialogTaskManagerBotDataLoader.

IMessageActivity Microsoft.Bot.Builder.Dialogs.Internals.IBotToUser.MakeMessage ( )
inherited

Make a message.

Returns
The new message.

Implemented in Microsoft.Bot.Builder.Dialogs.Internals.MapToChannelData_BotToUser.

void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Post< E > ( E @  event,
ResumeAfter< E >  resume 
)
inherited

Post an internal event to the queue.

Parameters
eventThe event to post to the queue.
resumeThe method to resume when the event has been delivered.
Task Microsoft.Bot.Builder.Dialogs.Internals.IBotToUser.PostAsync ( IMessageActivity  message,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inherited

Post a message to be sent to the user.

Parameters
messageThe message for the user.
cancellationTokenThe cancellation token.
Returns
A task that represents the post operation.

Implemented in Microsoft.Bot.Builder.Dialogs.Internals.MapToChannelData_BotToUser.

void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Reset ( )
inherited

Resets the stack.

void Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Wait< R > ( ResumeAfter< R >  resume)
inherited

Suspend the current dialog until an external event has been sent to the bot.

Parameters
resumeThe method to resume when the event has been received.

Property Documentation

IActivity Microsoft.Bot.Builder.Dialogs.IBotContext.Activity
getinherited

The activity posted to bot.

This is the incoming activity in reactive cases. for proactive case, i.e. Conversation.ResumeAsync code path, it will be the IMessageActivity returned by ConversationReference.GetPostToBotMessage.

Definition at line 75 of file IDialogContext.cs.

CancellationToken Microsoft.Bot.Builder.Dialogs.IBotContext.CancellationToken
getinherited

Definition at line 66 of file IDialogContext.cs.

IBotDataBag Microsoft.Bot.Builder.Dialogs.Internals.IBotData.ConversationData
getinherited

Private bot data associated with a conversation.

Definition at line 52 of file IBotData.cs.

IReadOnlyList<Delegate> Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack.Frames
getinherited

The dialog frames active on the stack.

Definition at line 51 of file IDialogTask.cs.

IBotDataBag Microsoft.Bot.Builder.Dialogs.Internals.IBotData.PrivateConversationData
getinherited

Private bot data associated with a user in a conversation.

Definition at line 57 of file IBotData.cs.

IBotDataBag Microsoft.Bot.Builder.Dialogs.Internals.IBotData.UserData
getinherited

Private bot data associated with a user (across all channels and conversations).

Definition at line 47 of file IBotData.cs.


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