Microsoft.Bot.Builder.Dialogs Namespace

Classes

ActivityPrompt

Basic configuration options supported by all prompts.

Address

The key that minimally and completely identifies a bot's conversation with a user on a channel.

AttachmentPrompt
Awaitable
AwaitableFromItem<T>

Creates a IAwaitable<T> from item passed to constructor.

AwaitableFromSource<TSource,TItem>

Creates a IAwaitable<T> from source passed to constructor.

Case<T,R>

The default implementation of ICase<T,R>.

Chain

A fluent, chainable interface for IDialogs.

Chain.WhereCanceledException

The exception that is thrown when the where is canceled.

ChannelCapability
ChannelCapabilityEx
ChannelIds
ChoicePrompt
ChronoDuration
ChronoDurationResolution
CommandDialog<T>.Command

A single command.

CommandDialog<T>

Dialog that dispatches based on a regex matching input.

ComponentDialog
ConfirmPrompt

Prompts a user to confirm something with a yes/no response.

By default the prompt will return to the calling dialog a boolean representing the users selection. When used with your bots 'DialogSet' you can simply add a new instance of the prompt as a named dialog using

DialogSet.Add()
. You can then start the prompt from a waterfall step using either

DialogContext.Begin()
or
DialogContext.Prompt()
. The user will be prompted to answer a

'yes/no' or 'true/false' question and the users response will be passed as an argument to the callers next waterfall step

Conversation

The top level composition root for the SDK.

ConversationAddressComparer

Compare two Address instances for equality, excluding the user information.

DateTimePrompt
DateTimeResolution
DefaultCase<T,R>

The default case for switch. ICase<T,R>

DeleteProfileScorable
Dialog

Base class for all dialogs.

DialogContext
DialogInstance

Tracking information for a dialog on the stack.

DialogSet

A related set of dialogs that can all call each other.

DialogStackException

The root of the exception hierarchy related to IDialogStack .

DialogState
DialogTurnResult

Result returned to the caller of one of the various stack manipulation methods and used to return the result from a final call to DialogContext.end() to the bots logic.

DispatchDialog

A dialog specialized to dispatch an IScorable.

DispatchDialog<TResult>

A dialog specialized to dispatch an IScorable.

EndConversationEvent

This event represents the end of the conversation. It is initiated by EndConversation(IDialogContext, String) and propagates as an event in the stack scorable process to allow interception.

Extensions

Helper methods.

GetTokenDialog

A Dialog to rerieve a user token for a configured OAuth connection This Dialog will first attempt to rerieve the user token from the Azure Bot Service If the Azure Bot Service does not already have a token, the GetTokenDialog will send the user an OAuthCard. The GetTokenDialog will then wait for either the user to come back, or for the user to send a validation code. The Dialog will attempt to exchange whatever response is sent for the user token. If successful, the dialog will return the token and otherwise will retry the specified number of times.

GetTokenResponse

Result object from the GetTokenDialog If the GetToken action is successful in retrieving a user token, the GetTokenDialog will be populated with the Token property If the GetToken action is unsuccessful in retrieving a user token, the GetTokenDialog will be populated with the NonTokenResponse property

InvalidIntentHandlerException

An exception for invalid intent handlers.

LuisActionDialog

The dialog wrapping Luis dialog feature.

LuisDialog<TResult>

A dialog specialized to handle intents and entities from LUIS.

LuisIntentAttribute

Associate a LUIS intent with a dialog method.

LuisServiceResult

Matches a LuisResult object with the best scored IntentRecommendation of the LuisResult and corresponding Luis service.

LuisTraceInfo

The schema for the LUIS trace info

MessageOptions

Optional message properties that can be sent SayAsync(IBotToUser, String, String, MessageOptions, String, CancellationToken)

MultipleResumeHandlerException

The exception representing multiple resume handlers specified for the dialog stack.

NoResumeHandlerException

The exception representing no resume handler specified for the dialog stack.

NumberPrompt<T>
OAuthPrompt

Creates a new prompt that asks the user to sign in using the Bot Frameworks Single Sign On (SSO) service.

@remarks The prompt will attempt to retrieve the users current token and if the user isn't signed in, it will send them an OAuthCard containing a button they can press to signin. Depending on the channel, the user will be sent through one of two possible signin flows:

  • The automatic signin flow where once the user signs in and the SSO service will forward the bot the users access token using either an event or invoke activity.
  • The "magic code" flow where where once the user signs in they will be prompted by the SSO service to send the bot a six digit code confirming their identity. This code will be sent as a standard message activity.

Both flows are automatically supported by the OAuthPrompt and the only thing you need to be careful of is that you don't block the event and invoke activities that the prompt might be waiting on.

> [!NOTE] > You should avoid persisting the access token with your bots other state. The Bot Frameworks > SSO service will securely store the token on your behalf. If you store it in your bots state > it could expire or be revoked in between turns. > > When calling the prompt from within a waterfall step you should use the token within the step > following the prompt and then let the token go out of scope at the end of your function.

Prompt Usage

When used with your bots DialogSet you can simply add a new instance of the prompt as a named dialog using DialogSet.add(). You can then start the prompt from a waterfall step using either DialogContext.begin() or DialogContext.prompt(). The user will be prompted to signin as needed and their access token will be passed as an argument to the callers next waterfall step.

OAuthPromptSettings
Prompt<T>

Basic configuration options supported by all prompts.

PromptDialog

Dialog factory for simple prompts.

PromptDialog.PromptAttachment

Prompt for an attachment

PromptDialog.PromptChoice<T>

Prompt for a choice from a set of choices.

PromptDialog.PromptConfirm

Prompt for a confirmation.

PromptDialog.PromptDouble

Prompt for a double.

PromptDialog.PromptInt64

Prompt for a Int64

PromptDialog.PromptString

Prompt for a text string.

PromptException

The root of the exception hierarchy related to prompts.

PromptOptions
PromptOptions<T>

Options for PromptDialog.

PromptOptionsWithSynonyms<T>

Options with synonyms for PromptDialog.

PromptRecognizeChoicesOptions
PromptRecognizeNumbersOptions
PromptRecognizer
PromptRecognizerResult<T>
PromptStyler

Styles a prompt

PromptValidatorContext<T>
RecognizeEntity<T>
RegexCase<R>

The regex case for switch.

ResumptionCookie

The resumption cookie that can be used to resume a conversation with a user.

TextPrompt
TooManyAttemptsException

The exception representing too many attempts by the user to answer the question asked by the prompt.

UrlToken

Allow object instances to serialized to URLs. Base64 can not be stored in URLs due to special characters.

WaterfallDialog

Dialog optimized for prompting a user with a series of questions. Waterfalls accept a stack of functions which will be executed in sequence.Each waterfall step can ask a question of the user and the users response will be passed as an argument to the next waterfall step.

WaterfallStepContext

Interfaces

IAddress

The key that minimally and completely identifies a bot's conversation with a user on a channel.

IAwaitable<T>

Explicit interface to support the compiling of async/await.

IBotContext

The context for the bot.

IBotDataBag

A property bag of bot data.

ICase<T,R>

The interface for cases evaluated by switch.

IChannelCapability

Capability for a specific channel

IDialog

A IDialog is a suspendable conversational process that produces an ignored result.

IDialog<TResult>

A IDialog<TResult> is a suspendable conversational process that produces a result of type TResult.

IDialogContext

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

IPromptOptions<T>

Options for PromptDialog.

IPromptRecognizeChoicesOptions
IPromptRecognizeNumbersOptions
IPromptRecognizer
IPromptRecognizeValuesOptions

Enums

DialogReason
DialogTurnStatus
PromptStyle

The style of generated prompt

Delegates

Chain.Continuation<T,R>

When the antecedent IDialog<TResult> has completed, execute this continuation method to construct the next IDialog<TResult>.

ContextualSelector<T,R>

The contextual selector function.

IntentActivityHandler

The handler for a LUIS intent.

IntentHandler

The handler for a LUIS intent.

PromptValidator<T>

The delegate definition for custom prompt validators. Implement this function to add custom validation to a prompt.

ResumeAfter<T>

Encapsulates a method that represents the code to execute after a result is available.

StartAsync

Encapsulate a method that represents the code to start a dialog.

WaterfallStep

A delegate definition of a Waterfall step. This is implemented by application code.