PromptDialog.PromptChoice<T> 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
PromptDialog.PromptChoice<T>(IPromptOptions<T>, Boolean, Boolean, Boolean, Double) |
Constructs a choice dialog. |
PromptDialog.PromptChoice<T>(IDictionary<T,IEnumerable<T>>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double) |
Constructor for a prompt choice dialog. |
PromptDialog.PromptChoice<T>(IEnumerable<T>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double) |
Constructor for a prompt choice dialog. |
PromptDialog.PromptChoice<T>(IPromptOptions<T>, Boolean, Boolean, Boolean, Double)
- Source:
- PromptDialog.cs
Constructs a choice dialog.
public PromptChoice (Microsoft.Bot.Builder.Dialogs.IPromptOptions<T> promptOptions, bool recognizeChoices = true, bool recognizeNumbers = true, bool recognizeOrdinals = true, double minScore = 0.4);
new Microsoft.Bot.Builder.Dialogs.PromptDialog.PromptChoice<'T> : Microsoft.Bot.Builder.Dialogs.IPromptOptions<'T> * bool * bool * bool * double -> Microsoft.Bot.Builder.Dialogs.PromptDialog.PromptChoice<'T>
Public Sub New (promptOptions As IPromptOptions(Of T), Optional recognizeChoices As Boolean = true, Optional recognizeNumbers As Boolean = true, Optional recognizeOrdinals As Boolean = true, Optional minScore As Double = 0.4)
Parameters
- promptOptions
- IPromptOptions<T>
The prompt options
- recognizeChoices
- Boolean
(Optional) if true, the prompt will attempt to recognize the selected value using the choices themselves. The default value is "true".
- recognizeNumbers
- Boolean
(Optional) if true, the prompt will attempt to recognize numbers in the users utterance as the index of the choice to return. The default value is "true".
- recognizeOrdinals
- Boolean
(Optional) if true, the prompt will attempt to recognize ordinals like "the first one" or "the second one" as the index of the choice to return. The default value is "true".
- minScore
- Double
(Optional) minimum score from 0.0 - 1.0 needed for a recognized choice to be considered a match. The default value is "0.4".
Applies to
PromptDialog.PromptChoice<T>(IDictionary<T,IEnumerable<T>>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)
- Source:
- PromptDialog.cs
Constructor for a prompt choice dialog.
public PromptChoice (System.Collections.Generic.IDictionary<T,System.Collections.Generic.IEnumerable<T>> choices, string prompt, string retry, int attempts, Microsoft.Bot.Builder.Dialogs.PromptStyle promptStyle = Microsoft.Bot.Builder.Dialogs.PromptStyle.Auto, System.Collections.Generic.IEnumerable<string> descriptions = default, bool recognizeChoices = true, bool recognizeNumbers = true, bool recognizeOrdinals = true, double minScore = 0.4);
new Microsoft.Bot.Builder.Dialogs.PromptDialog.PromptChoice<'T> : System.Collections.Generic.IDictionary<'T, seq<'T>> * string * string * int * Microsoft.Bot.Builder.Dialogs.PromptStyle * seq<string> * bool * bool * bool * double -> Microsoft.Bot.Builder.Dialogs.PromptDialog.PromptChoice<'T>
Public Sub New (choices As IDictionary(Of T, IEnumerable(Of T)), prompt As String, retry As String, attempts As Integer, Optional promptStyle As PromptStyle = Microsoft.Bot.Builder.Dialogs.PromptStyle.Auto, Optional descriptions As IEnumerable(Of String) = Nothing, Optional recognizeChoices As Boolean = true, Optional recognizeNumbers As Boolean = true, Optional recognizeOrdinals As Boolean = true, Optional minScore As Double = 0.4)
Parameters
- choices
- IDictionary<T,IEnumerable<T>>
Dictionary with the options to choose from as a key and their synonyms as a value.
- prompt
- String
The prompt.
- retry
- String
What to display on retry.
- attempts
- Int32
Maximum number of attempts.
- promptStyle
- PromptStyle
Style of the prompt PromptStyle
- descriptions
- IEnumerable<String>
Descriptions to show for each option.
- recognizeChoices
- Boolean
(Optional) if true, the prompt will attempt to recognize the selected value using the choices themselves. The default value is "true".
- recognizeNumbers
- Boolean
(Optional) if true, the prompt will attempt to recognize numbers in the users utterance as the index of the choice to return. The default value is "true".
- recognizeOrdinals
- Boolean
(Optional) if true, the prompt will attempt to recognize ordinals like "the first one" or "the second one" as the index of the choice to return. The default value is "true".
- minScore
- Double
(Optional) minimum score from 0.0 - 1.0 needed for a recognized choice to be considered a match. The default value is "0.4".
Applies to
PromptDialog.PromptChoice<T>(IEnumerable<T>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)
- Source:
- PromptDialog.cs
Constructor for a prompt choice dialog.
public PromptChoice (System.Collections.Generic.IEnumerable<T> options, string prompt, string retry, int attempts, Microsoft.Bot.Builder.Dialogs.PromptStyle promptStyle = Microsoft.Bot.Builder.Dialogs.PromptStyle.Auto, System.Collections.Generic.IEnumerable<string> descriptions = default, bool recognizeChoices = true, bool recognizeNumbers = true, bool recognizeOrdinals = true, double minScore = 0.4);
new Microsoft.Bot.Builder.Dialogs.PromptDialog.PromptChoice<'T> : seq<'T> * string * string * int * Microsoft.Bot.Builder.Dialogs.PromptStyle * seq<string> * bool * bool * bool * double -> Microsoft.Bot.Builder.Dialogs.PromptDialog.PromptChoice<'T>
Public Sub New (options As IEnumerable(Of T), prompt As String, retry As String, attempts As Integer, Optional promptStyle As PromptStyle = Microsoft.Bot.Builder.Dialogs.PromptStyle.Auto, Optional descriptions As IEnumerable(Of String) = Nothing, Optional recognizeChoices As Boolean = true, Optional recognizeNumbers As Boolean = true, Optional recognizeOrdinals As Boolean = true, Optional minScore As Double = 0.4)
Parameters
- options
- IEnumerable<T>
Enumerable of the options to choose from.
- prompt
- String
The prompt.
- retry
- String
What to display on retry.
- attempts
- Int32
Maximum number of attempts.
- promptStyle
- PromptStyle
Style of the prompt PromptStyle
- descriptions
- IEnumerable<String>
Descriptions to show for each option.
- recognizeChoices
- Boolean
(Optional) if true, the prompt will attempt to recognize the selected value using the choices themselves. The default value is "true".
- recognizeNumbers
- Boolean
(Optional) if true, the prompt will attempt to recognize numbers in the users utterance as the index of the choice to return. The default value is "true".
- recognizeOrdinals
- Boolean
(Optional) if true, the prompt will attempt to recognize ordinals like "the first one" or "the second one" as the index of the choice to return. The default value is "true".
- minScore
- Double
(Optional) minimum score from 0.0 - 1.0 needed for a recognized choice to be considered a match. The default value is "0.4".