TurnContextStateCollection Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Values persisted for the lifetime of the turn as part of the ITurnContext.
public class TurnContextStateCollection : System.Collections.Generic.Dictionary<string,object>, IDisposable
type TurnContextStateCollection = class
inherit Dictionary<string, obj>
interface IDisposable
Public Class TurnContextStateCollection
Inherits Dictionary(Of String, Object)
Implements IDisposable
- Inheritance
-
TurnContextStateCollection
- Implements
Remarks
Typical values which are stored here are objects which are needed for the lifetime of a turn, such as IStorage, BotState, ConversationState, ILanguageGenerator, ResourceExplorer etc.
Constructors
TurnContextStateCollection() |
Initializes a new instance of the TurnContextStateCollection class. |
Methods
Add<T>(String, T) |
Adds a value to the turn's context. |
Add<T>(T) |
Adds a value to the turn's context. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Dispose(Boolean) |
Frees resources if the disposing parameter is set to true. |
Get<T>() |
Gets the default value by type from the turn's context. |
Get<T>(String) |
Gets a cached value by name from the turn's context. |
Set<T>(String, T) |
Set a value to the turn's context. |
Set<T>(T) |
Set a value to the turn's context. |