Table of Contents

Class ConversationState

Namespace
Microsoft.Agents.Builder.State
Assembly
Microsoft.Agents.Builder.dll

Defines a state keyed to a conversation.

public class ConversationState : AgentState, IPropertyManager, IAgentState
Inheritance
ConversationState
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

ConversationState(IStorage)

Defines a state keyed to a conversation.

public ConversationState(IStorage storage)

Parameters

storage IStorage

The 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

string

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 ITurnContext

The context object for this turn.

Returns

string

The storage key.

Remarks

Conversation state includes the channel ID and conversation ID as part of its storage key.