Langue

Extensions.GetValue<T>(IBotDataBag, String) Méthode

Définition

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

T

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.

Exceptions

S’applique à