Microsoft.Bot.Builder.Dialogs.IBotDataBag Interface Reference

A property bag of bot data. More...

Public Member Functions

void Clear ()
 Removes all of the values from data bag. More...
 
bool ContainsKey (string key)
 Checks if data bag contains a value with specified key More...
 
bool RemoveValue (string key)
 Removes the specified key from the bot data bag. More...
 
void SetValue< T > (string key, T value)
 Adds the specified key and value to the bot data bag. More...
 
bool TryGetValue< T > (string key, out T value)
 Gets the value associated with the specified key. More...
 

Properties

int Count [get]
 Gets the number of key/value pairs contained in the IBotDataBag. More...
 

Detailed Description

A property bag of bot data.

Definition at line 41 of file IBotDataBag.cs.

Member Function Documentation

void Microsoft.Bot.Builder.Dialogs.IBotDataBag.Clear ( )

Removes all of the values from data bag.

bool Microsoft.Bot.Builder.Dialogs.IBotDataBag.ContainsKey ( string  key)

Checks if data bag contains a value with specified key

Parameters
keyThe key.
bool Microsoft.Bot.Builder.Dialogs.IBotDataBag.RemoveValue ( string  key)

Removes the specified key from the bot data bag.

Parameters
keyThey key of the element to remove
Returns
True if removal of the key is successful; otherwise, false
void Microsoft.Bot.Builder.Dialogs.IBotDataBag.SetValue< T > ( string  key,
value 
)

Adds the specified key and value to the bot data bag.

Template Parameters
TThe type of the value to get.
Parameters
keyThe key of the element to add.
valueThe value of the element to add. The value can be null for reference types.
bool Microsoft.Bot.Builder.Dialogs.IBotDataBag.TryGetValue< T > ( string  key,
out T  value 
)

Gets the value associated with the specified key.

Template Parameters
TThe type of the value to set.
Parameters
keyThe key of the value to get.
valueWhen this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
Returns
true if the IBotDataBag contains an element with the specified key; otherwise, false.

Property Documentation

int Microsoft.Bot.Builder.Dialogs.IBotDataBag.Count
get

Gets the number of key/value pairs contained in the IBotDataBag.

Definition at line 46 of file IBotDataBag.cs.


The documentation for this interface was generated from the following file: