Microsoft.Bot.Builder.Dialogs.PromptDialog Class Reference

Dialog factory for simple prompts. More...

Classes

class  PromptAttachment
 Prompt for an attachment More...
 
class  PromptChoice
 Prompt for a choice from a set of choices. More...
 
class  PromptConfirm
 Prompt for a confirmation. More...
 
class  PromptDouble
 Prompt for a double. More...
 
class  PromptInt64
 Prompt for a confirmation. More...
 
class  PromptString
 Prompt for a text string. More...
 

Static Public Member Functions

static void Attachment (IDialogContext context, ResumeAfter< IEnumerable< Attachment >> resume, string prompt, IEnumerable< string > contentTypes=null, string retry=null, int attempts=3)
 Prompt for an attachment More...
 
static void Choice< T > (IDialogContext context, ResumeAfter< T > resume, IEnumerable< T > options, string prompt, string retry=null, int attempts=3, PromptStyle promptStyle=PromptStyle.Auto, IEnumerable< string > descriptions=null)
 Prompt for one of a set of choices. More...
 
static void Choice< T > (IDialogContext context, ResumeAfter< T > resume, PromptOptions< T > promptOptions)
 Prompt for one of a set of choices. More...
 
static void Confirm (IDialogContext context, ResumeAfter< bool > resume, string prompt, string retry=null, int attempts=3, PromptStyle promptStyle=PromptStyle.Auto)
 Ask a yes/no question. More...
 
static void Confirm (IDialogContext context, ResumeAfter< bool > resume, PromptOptions< string > promptOptions)
 Ask a yes/no questions. More...
 
static void Number (IDialogContext context, ResumeAfter< long > resume, string prompt, string retry=null, int attempts=3)
 Prompt for a long. More...
 
static void Number (IDialogContext context, ResumeAfter< double > resume, string prompt, string retry=null, int attempts=3)
 Prompt for a double. More...
 
static void Text (IDialogContext context, ResumeAfter< string > resume, string prompt, string retry=null, int attempts=3)
 Prompt for a string. More...
 

Detailed Description

Dialog factory for simple prompts.

The exception TooManyAttemptsException will be thrown if the number of allowed attempts is exceeded.

Definition at line 275 of file PromptDialog.cs.

Member Function Documentation

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Attachment ( IDialogContext  context,
ResumeAfter< IEnumerable< Attachment >>  resume,
string  prompt,
IEnumerable< string >  contentTypes = null,
string  retry = null,
int  attempts = 3 
)
inlinestatic

Prompt for an attachment

Parameters
contextThe dialog context.
resumeResume handler.
promptThe prompt to show to the user.
contentTypesThe optional content types the attachment type should be part of
retryWhat to show on retry
attemptsThe number of times to retry

Definition at line 374 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Choice< T > ( IDialogContext  context,
ResumeAfter< T >  resume,
IEnumerable< T >  options,
string  prompt,
string  retry = null,
int  attempts = 3,
PromptStyle  promptStyle = PromptStyle.Auto,
IEnumerable< string >  descriptions = null 
)
inlinestatic

Prompt for one of a set of choices.

Parameters
contextThe context.
resumeResume handler.
optionsThe possible options all of which must be convertible to a string.
promptThe prompt to show to the user.
retryWhat to show on retry.
attemptsThe number of times to retry.
promptStyleStyle of the prompt PromptStyle
descriptionsDescriptions to display for choices.

Definition at line 346 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Choice< T > ( IDialogContext  context,
ResumeAfter< T >  resume,
PromptOptions< T >  promptOptions 
)
inlinestatic

Prompt for one of a set of choices.

T should implement object.ToString

Template Parameters
TThe type of the options.
Parameters
contextThe dialog context.
resumeResume handler.
promptOptionsThe prompt options.

Definition at line 359 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Confirm ( IDialogContext  context,
ResumeAfter< bool >  resume,
string  prompt,
string  retry = null,
int  attempts = 3,
PromptStyle  promptStyle = PromptStyle.Auto 
)
inlinestatic

Ask a yes/no question.

Parameters
contextThe context.
resumeResume handler.
promptThe prompt to show to the user.
retryWhat to show on retry.
attemptsThe number of times to retry.
promptStyleStyle of the prompt PromptStyle

Definition at line 296 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Confirm ( IDialogContext  context,
ResumeAfter< bool >  resume,
PromptOptions< string >  promptOptions 
)
inlinestatic

Ask a yes/no questions.

Parameters
contextThe dialog context.
resumeResume handler.
promptOptionsThe options for the prompt, PromptOptions<T>.

Definition at line 307 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Number ( IDialogContext  context,
ResumeAfter< long >  resume,
string  prompt,
string  retry = null,
int  attempts = 3 
)
inlinestatic

Prompt for a long.

Parameters
contextThe context.
resumeResume handler.
promptThe prompt to show to the user.
retryWhat to show on retry.
attemptsThe number of times to retry.

Definition at line 319 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Number ( IDialogContext  context,
ResumeAfter< double >  resume,
string  prompt,
string  retry = null,
int  attempts = 3 
)
inlinestatic

Prompt for a double.

Parameters
contextThe context.
resumeResume handler.
promptThe prompt to show to the user.
retryWhat to show on retry.
attemptsThe number of times to retry.

Definition at line 331 of file PromptDialog.cs.

static void Microsoft.Bot.Builder.Dialogs.PromptDialog.Text ( IDialogContext  context,
ResumeAfter< string >  resume,
string  prompt,
string  retry = null,
int  attempts = 3 
)
inlinestatic

Prompt for a string.

Parameters
contextThe context.
resumeResume handler.
promptThe prompt to show to the user.
retryWhat to show on retry.
attemptsThe number of times to retry.

Definition at line 283 of file PromptDialog.cs.


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