Class UserState
Defines a state keyed to a user.
public class UserState : AgentState, IPropertyManager, IAgentState
- Inheritance
-
UserState
- Implements
- Inherited Members
Remarks
Conversation state is available in any turn in a specific conversation, regardless of user, such as in a group conversation.
Constructors
UserState(IStorage)
Defines a state keyed to a user.
public UserState(IStorage storage)
Parameters
storage
IStorageThe storage layer to use.
Remarks
Conversation state is available in any turn in a specific conversation, regardless of user, such as in a group conversation.
Fields
ScopeName
public static readonly string ScopeName
Field Value
Methods
GetStorageKey(ITurnContext)
Gets the key to use when reading and writing state to and from storage.
protected override string GetStorageKey(ITurnContext turnContext)
Parameters
turnContext
ITurnContextThe context object for this turn.
Returns
- string
The storage key.
Remarks
User state includes the channel ID and user ID as part of its storage key.