Share via


ChoiceInput Class

Definition

ChoiceInput - Declarative input to gather choices from user.

public class ChoiceInput : Microsoft.Bot.Builder.Dialogs.Adaptive.Input.InputDialog
type ChoiceInput = class
    inherit InputDialog
Public Class ChoiceInput
Inherits InputDialog
Inheritance
ChoiceInput

Constructors

ChoiceInput(String, Int32)

Initializes a new instance of the ChoiceInput class.

Fields

Kind

Class identifier.

TURN_COUNT_PROPERTY

Defines dialog context turn count property value.

(Inherited from InputDialog)
VALUE_PROPERTY

Defines dialog context state property value.

(Inherited from InputDialog)

Properties

AllowInterruptions

Gets or sets intteruption policy.

(Inherited from InputDialog)
AlwaysPrompt

Gets or sets a value indicating whether the input should always prompt the user regardless of there being a value or not.

(Inherited from InputDialog)
ChoiceOptions

Gets or sets choiceOptions controls display options for customizing language.

Choices

Gets or sets list of choices to present to user.

DefaultLocale

Gets or sets the DefaultLocale to use to parse confirmation choices if there is not one passed by the caller.

DefaultValue

Gets or sets the default value for the input dialog when MaxTurnCount is exceeded.

(Inherited from InputDialog)
DefaultValueResponse

Gets or sets the activity template to send when MaxTurnCount has been reached and the default value is used.

(Inherited from InputDialog)
Disabled

Gets or sets whether this action should be disabled.

(Inherited from InputDialog)
Id

Gets or sets id for the dialog.

(Inherited from Dialog)
InvalidPrompt

Gets or sets the activity template to send to the user whenever the value provided is invalid.

(Inherited from InputDialog)
MaxTurnCount

Gets or sets maximum number of times to ask the user for this value before the dialog gives up.

(Inherited from InputDialog)
OutputFormat

Gets or sets the format of the response (value or the index of the choice).

Prompt

Gets or sets the activity to send to the user.

(Inherited from InputDialog)
Property

Gets or sets the memory property path which the value will be bound to.

(Inherited from InputDialog)
RecognizerOptions

Gets or sets how to recognize choices in the response.

Source

Gets the information of the cref="SourceRange"/>.

(Inherited from Dialog)
Style

Gets or sets ListStyle to use to render the choices.

TelemetryClient

Gets or sets the IBotTelemetryClient to use for logging.

(Inherited from Dialog)
UnrecognizedPrompt

Gets or sets the activity template for retrying.

(Inherited from InputDialog)
Validations

Gets or sets the expressions to run to validate the input.

(Inherited from InputDialog)
Value

Gets or sets a the expression to use to bind input to the dialog.

(Inherited from InputDialog)

Methods

AppendChoices(IMessageActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, CancellationToken)

AppendChoices is utility method to build up a message activity given all of the options.

(Inherited from InputDialog)
AppendChoices(IMessageActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, String, IList<String>, CancellationToken)

AppendChoices is utility method to build up a message activity given all of the options.

(Inherited from InputDialog)
BeginDialogAsync(DialogContext, Object, CancellationToken)

Called when the dialog is started and pushed onto the dialog stack.

(Inherited from InputDialog)
ContinueDialogAsync(DialogContext, CancellationToken)

Called when the dialog is continued, where it is the active dialog and the user replies with a new activity.

(Inherited from InputDialog)
EndDialogAsync(ITurnContext, DialogInstance, DialogReason, CancellationToken)

Called when the dialog is ending.

(Inherited from Dialog)
GetVersion()

Gets a unique string which represents the version of this dialog. If the version changes between turns the dialog system will emit a DialogChanged event.

(Inherited from Dialog)
OnComputeId()

Builds the compute Id for the dialog.

(Inherited from Dialog)
OnDialogEventAsync(DialogContext, DialogEvent, CancellationToken)

Called when an event has been raised, using DialogContext.emitEvent(), by either the current dialog or a dialog that the current dialog started.

(Inherited from Dialog)
OnInitializeOptions(DialogContext, Object)

Method which processes options.

OnPostBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

Called after an event was bubbled to all parents and wasn't handled.

(Inherited from Dialog)
OnPreBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

Called before an event is bubbled to its parent.

(Inherited from InputDialog)
OnRecognizeInputAsync(DialogContext, CancellationToken)

Called when input has been received, recognizes choice.

OnRenderPromptAsync(DialogContext, InputState, CancellationToken)

Method which renders the prompt to the user given the current input state.

RegisterSourceLocation(String, Int32)

Registers a cref="SourceRange"/> in the provided location.

(Inherited from Dialog)
RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken)

Called when the dialog should re-prompt the user for input.

(Inherited from Dialog)
ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken)

Replaces the result with the FoundChoice value if possible, then proceeds to ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken).

Extension Methods

RunAsync(Dialog, ITurnContext, IStatePropertyAccessor<DialogState>, CancellationToken)

Creates a dialog stack and starts a dialog, pushing it onto the stack.

Applies to