Extensions.GetValue<T>(IBotDataBag, String) 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.
Obtient la valeur associée à la clé spécifiée.
public static T GetValue<T>(this Microsoft.Bot.Builder.Dialogs.IBotDataBag bag, string key);
static member GetValue : Microsoft.Bot.Builder.Dialogs.IBotDataBag * string -> 'T
<Extension()>
Public Function GetValue(Of T) (bag As IBotDataBag, key As String) As T
Paramètres de type
- T
Le type de valeur à obtenir.
Paramètres
- bag
- IBotDataBag
Le sac de données du bot.
- key
- String
Clé de la valeur à obtenir ou définir.
Retours
Valeur associée à la clé spécifiée. Si la clé spécifiée n’est pas trouvée, une opération get génère une KeyNotFoundException.