ChoicePrompt Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ChoicePrompt(String, PromptValidator<FoundChoice>, String) |
Initializes a new instance of the ChoicePrompt class. |
ChoicePrompt(String, Dictionary<String,ChoiceFactoryOptions>, PromptValidator<FoundChoice>, String) |
Initializes a new instance of the ChoicePrompt class. |
ChoicePrompt(String, PromptValidator<FoundChoice>, String)
Initializes a new instance of the ChoicePrompt class.
public ChoicePrompt (string dialogId, Microsoft.Bot.Builder.Dialogs.PromptValidator<Microsoft.Bot.Builder.Dialogs.Choices.FoundChoice> validator = default, string defaultLocale = default);
new Microsoft.Bot.Builder.Dialogs.ChoicePrompt : string * Microsoft.Bot.Builder.Dialogs.PromptValidator<Microsoft.Bot.Builder.Dialogs.Choices.FoundChoice> * string -> Microsoft.Bot.Builder.Dialogs.ChoicePrompt
Public Sub New (dialogId As String, Optional validator As PromptValidator(Of FoundChoice) = Nothing, Optional defaultLocale As String = Nothing)
Parameters
- dialogId
- String
The ID to assign to this prompt.
- validator
- PromptValidator<FoundChoice>
Optional, a PromptValidator<T> that contains additional, custom validation for this prompt.
- defaultLocale
- String
Optional, the default locale used to determine language-specific behavior of the prompt. The locale is a 2, 3, or 4 character ISO 639 code that represents a language or language family.
Remarks
The value of dialogId
must be unique within the DialogSet or ComponentDialog to which the prompt is added.
If the Locale of the DialogContext.Context.Activity is specified, then that local is used to determine language specific behavior; otherwise the defaultLocale
is used. US-English is the used if no language or default locale is available, or if the language or locale is not otherwise supported.
Applies to
ChoicePrompt(String, Dictionary<String,ChoiceFactoryOptions>, PromptValidator<FoundChoice>, String)
Initializes a new instance of the ChoicePrompt class.
public ChoicePrompt (string dialogId, System.Collections.Generic.Dictionary<string,Microsoft.Bot.Builder.Dialogs.Choices.ChoiceFactoryOptions> choiceDefaults, Microsoft.Bot.Builder.Dialogs.PromptValidator<Microsoft.Bot.Builder.Dialogs.Choices.FoundChoice> validator = default, string defaultLocale = default);
new Microsoft.Bot.Builder.Dialogs.ChoicePrompt : string * System.Collections.Generic.Dictionary<string, Microsoft.Bot.Builder.Dialogs.Choices.ChoiceFactoryOptions> * Microsoft.Bot.Builder.Dialogs.PromptValidator<Microsoft.Bot.Builder.Dialogs.Choices.FoundChoice> * string -> Microsoft.Bot.Builder.Dialogs.ChoicePrompt
Public Sub New (dialogId As String, choiceDefaults As Dictionary(Of String, ChoiceFactoryOptions), Optional validator As PromptValidator(Of FoundChoice) = Nothing, Optional defaultLocale As String = Nothing)
Parameters
- dialogId
- String
The ID to assign to this prompt.
- choiceDefaults
- Dictionary<String,ChoiceFactoryOptions>
Overrides the dictionary of Bot Framework SDK-supported _choiceDefaults (for prompt localization). Must be passed in to each ConfirmPrompt that needs the custom choice defaults.
- validator
- PromptValidator<FoundChoice>
Optional, a PromptValidator<T> that contains additional, custom validation for this prompt.
- defaultLocale
- String
Optional, the default locale used to determine language-specific behavior of the prompt. The locale is a 2, 3, or 4 character ISO 639 code that represents a language or language family.
Remarks
The value of dialogId
must be unique within the DialogSet or ComponentDialog to which the prompt is added.
If the Locale of the DialogContext.Context.Activity is specified, then that local is used to determine language specific behavior; otherwise the defaultLocale
is used. US-English is the used if no language or default locale is available, or if the language or locale is not otherwise supported.