Condividi tramite


Extensions.GetValue<T>(IBotDataBag, String) Metodo

Definizione

Ottiene il valore associato alla chiave specificata.

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

Parametri di tipo

T

Tipo del valore da ottenere.

Parametri

bag
IBotDataBag

Borsa dati del bot.

key
String

Chiave del valore da ottenere o impostare.

Restituisce

T

Valore associato alla chiave specificata. Se la chiave specificata non viene trovata, un'operazione get genera una chiaveNotFoundException.

Eccezioni

Si applica a