Share via


PromptDialog.PromptChoice<T> 构造函数

定义

重载

PromptDialog.PromptChoice<T>(IPromptOptions<T>, Boolean, Boolean, Boolean, Double)

构造一个选择对话框。

PromptDialog.PromptChoice<T>(IDictionary<T,IEnumerable<T>>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)

提示选择对话框的构造函数。

PromptDialog.PromptChoice<T>(IEnumerable<T>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)

提示选择对话框的构造函数。

PromptDialog.PromptChoice<T>(IPromptOptions<T>, Boolean, Boolean, Boolean, Double)

构造一个选择对话框。

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)

参数

promptOptions
IPromptOptions<T>

提示选项

recognizeChoices
Boolean

(Optional) 如果为 true,则提示将尝试使用选项本身识别所选值。 默认值为“true”。

recognizeNumbers
Boolean

(可选) 如果为 true,则提示将尝试将用户话语中的数字识别为要返回的所选索引。 默认值为“true”。

recognizeOrdinals
Boolean

(可选) 如果为 true,则提示将尝试将“第一个”或“第二个”等序号识别为要返回的所选索引。 默认值为“true”。

minScore
Double

(可选) 将已识别的选择视为匹配项所需的最低分数为 0.0 - 1.0。 默认值为“0.4”。

适用于

PromptDialog.PromptChoice<T>(IDictionary<T,IEnumerable<T>>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)

提示选择对话框的构造函数。

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)

参数

choices
IDictionary<T,IEnumerable<T>>

字典,其中选项可供选择作为键,其同义词作为值。

prompt
String

提示符。

retry
String

重试时显示的内容。

attempts
Int32

最大尝试次数。

promptStyle
PromptStyle

提示的样式 PromptStyle

descriptions
IEnumerable<String>

要为每个选项显示的说明。

recognizeChoices
Boolean

(Optional) 如果为 true,则提示将尝试使用选项本身识别所选值。 默认值为“true”。

recognizeNumbers
Boolean

(可选) 如果为 true,则提示将尝试将用户话语中的数字识别为要返回的所选索引。 默认值为“true”。

recognizeOrdinals
Boolean

(可选) 如果为 true,则提示将尝试将“第一个”或“第二个”等序号识别为要返回的所选索引。 默认值为“true”。

minScore
Double

(可选) 将已识别的选择视为匹配项所需的最低分数为 0.0 - 1.0。 默认值为“0.4”。

适用于

PromptDialog.PromptChoice<T>(IEnumerable<T>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)

提示选择对话框的构造函数。

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)

参数

options
IEnumerable<T>

可供选择的选项的枚举。

prompt
String

提示符。

retry
String

重试时显示的内容。

attempts
Int32

最大尝试次数。

promptStyle
PromptStyle

提示的样式 PromptStyle

descriptions
IEnumerable<String>

要为每个选项显示的说明。

recognizeChoices
Boolean

(Optional) 如果为 true,则提示将尝试使用选项本身识别所选值。 默认值为“true”。

recognizeNumbers
Boolean

(可选) 如果为 true,则提示将尝试将用户话语中的数字识别为要返回的所选索引。 默认值为“true”。

recognizeOrdinals
Boolean

(可选) 如果为 true,则提示将尝试将“第一个”或“第二个”等序号识别为要返回的所选索引。 默认值为“true”。

minScore
Double

(可选) 将已识别的选择视为匹配项所需的最低分数为 0.0 - 1.0。 默认值为“0.4”。

适用于