PromptDialog.Choice Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| Choice<T>(IDialogContext, ResumeAfter<T>, IPromptOptions<T>, Boolean, Boolean, Boolean, Double) |
Invite pour l’un d’un ensemble de choix. |
| Choice<T>(IDialogContext, ResumeAfter<T>, IEnumerable<T>, String, String, Int32, PromptStyle, IEnumerable<String>) |
Invite pour l’un d’un ensemble de choix. |
| Choice<T>(IDialogContext, ResumeAfter<T>, IDictionary<T,IEnumerable<T>>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double) |
Invite pour l’un d’un ensemble de choix. |
Choice<T>(IDialogContext, ResumeAfter<T>, IPromptOptions<T>, Boolean, Boolean, Boolean, Double)
- Source:
- PromptDialog.cs
Invite pour l’un d’un ensemble de choix.
public static void Choice<T>(Microsoft.Bot.Builder.Dialogs.IDialogContext context, Microsoft.Bot.Builder.Dialogs.ResumeAfter<T> resume, Microsoft.Bot.Builder.Dialogs.IPromptOptions<T> promptOptions, bool recognizeChoices = true, bool recognizeNumbers = true, bool recognizeOrdinals = true, double minScore = 0.4);
static member Choice : Microsoft.Bot.Builder.Dialogs.IDialogContext * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'T> * Microsoft.Bot.Builder.Dialogs.IPromptOptions<'T> * bool * bool * bool * double -> unit
Public Shared Sub Choice(Of T) (context As IDialogContext, resume As ResumeAfter(Of T), 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)
Paramètres de type
- T
Le type d’options.
Paramètres
- context
- IDialogContext
Contexte de boîte de dialogue.
- resume
- ResumeAfter<T>
Responsable CV.
- promptOptions
- IPromptOptions<T>
Les options de prompt.
- recognizeChoices
- Boolean
(Facultatif) si la valeur est true, l’invite tente de reconnaître la valeur sélectionnée à l’aide des choix eux-mêmes. La valeur par défaut est « true ».
- recognizeNumbers
- Boolean
(Facultatif) si la valeur est true, l’invite tente de reconnaître les nombres dans l’énoncé des utilisateurs en tant qu’index du choix à retourner. La valeur par défaut est « true ».
- recognizeOrdinals
- Boolean
(Facultatif) si la valeur est true, l’invite tente de reconnaître les ordinals tels que « le premier » ou « le second » comme index du choix à retourner. La valeur par défaut est « true ».
- minScore
- Double
(Facultatif) score minimal compris entre 0,0 et 1,0 nécessaire pour qu’un choix reconnu soit considéré comme une correspondance. La valeur par défaut est « 0.4 ».
Remarques
T devrait être mis en œuvre ToString()
S’applique à
Choice<T>(IDialogContext, ResumeAfter<T>, IEnumerable<T>, String, String, Int32, PromptStyle, IEnumerable<String>)
- Source:
- PromptDialog.cs
Invite pour l’un d’un ensemble de choix.
public static void Choice<T>(Microsoft.Bot.Builder.Dialogs.IDialogContext context, Microsoft.Bot.Builder.Dialogs.ResumeAfter<T> resume, System.Collections.Generic.IEnumerable<T> options, string prompt, string retry = default, int attempts = 3, Microsoft.Bot.Builder.Dialogs.PromptStyle promptStyle = Microsoft.Bot.Builder.Dialogs.PromptStyle.Auto, System.Collections.Generic.IEnumerable<string> descriptions = default);
static member Choice : Microsoft.Bot.Builder.Dialogs.IDialogContext * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'T> * seq<'T> * string * string * int * Microsoft.Bot.Builder.Dialogs.PromptStyle * seq<string> -> unit
Public Shared Sub Choice(Of T) (context As IDialogContext, resume As ResumeAfter(Of T), options As IEnumerable(Of T), prompt As String, Optional retry As String = Nothing, Optional attempts As Integer = 3, Optional promptStyle As PromptStyle = Microsoft.Bot.Builder.Dialogs.PromptStyle.Auto, Optional descriptions As IEnumerable(Of String) = Nothing)
Paramètres de type
- T
Paramètres
- context
- IDialogContext
Contexte.
- resume
- ResumeAfter<T>
Responsable CV.
- options
- IEnumerable<T>
Les options possibles doivent toutes être converties en une corde.
- prompt
- String
L’invite à montrer à l’utilisateur.
- retry
- String
Que montrer lors d’une réessaie.
- attempts
- Int32
Le nombre de fois à recommencer.
- promptStyle
- PromptStyle
Style de la consigne PromptStyle
- descriptions
- IEnumerable<String>
Descriptions à afficher pour les choix.
S’applique à
Choice<T>(IDialogContext, ResumeAfter<T>, IDictionary<T,IEnumerable<T>>, String, String, Int32, PromptStyle, IEnumerable<String>, Boolean, Boolean, Boolean, Double)
- Source:
- PromptDialog.cs
Invite pour l’un d’un ensemble de choix.
public static void Choice<T>(Microsoft.Bot.Builder.Dialogs.IDialogContext context, Microsoft.Bot.Builder.Dialogs.ResumeAfter<T> resume, System.Collections.Generic.IDictionary<T,System.Collections.Generic.IEnumerable<T>> choices, string prompt, string retry = default, int attempts = 3, 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);
static member Choice : Microsoft.Bot.Builder.Dialogs.IDialogContext * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'T> * System.Collections.Generic.IDictionary<'T, seq<'T>> * string * string * int * Microsoft.Bot.Builder.Dialogs.PromptStyle * seq<string> * bool * bool * bool * double -> unit
Public Shared Sub Choice(Of T) (context As IDialogContext, resume As ResumeAfter(Of T), choices As IDictionary(Of T, IEnumerable(Of T)), prompt As String, Optional retry As String = Nothing, Optional attempts As Integer = 3, 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)
Paramètres de type
- T
Paramètres
- context
- IDialogContext
Contexte.
- resume
- ResumeAfter<T>
Responsable CV.
- choices
- IDictionary<T,IEnumerable<T>>
Dictionnaire avec les options à choisir comme clé et leurs synonymes comme valeur.
- prompt
- String
L’invite à montrer à l’utilisateur.
- retry
- String
Que montrer lors d’une réessaie.
- attempts
- Int32
Le nombre de fois à recommencer.
- promptStyle
- PromptStyle
Style de la consigne PromptStyle
- descriptions
- IEnumerable<String>
Descriptions à afficher pour les choix.
- recognizeChoices
- Boolean
(Facultatif) si la valeur est true, l’invite tente de reconnaître la valeur sélectionnée à l’aide des choix eux-mêmes. La valeur par défaut est « true ».
- recognizeNumbers
- Boolean
(Facultatif) si la valeur est true, l’invite tente de reconnaître les nombres dans l’énoncé des utilisateurs en tant qu’index du choix à retourner. La valeur par défaut est « true ».
- recognizeOrdinals
- Boolean
(Facultatif) si la valeur est true, l’invite tente de reconnaître les ordinals tels que « le premier » ou « le second » comme index du choix à retourner. La valeur par défaut est « true ».
- minScore
- Double
(Facultatif) score minimal compris entre 0,0 et 1,0 nécessaire pour qu’un choix reconnu soit considéré comme une correspondance. La valeur par défaut est « 0.4 ».