Del via


ConversationState Class

Definition

Defines a state keyed to a conversation.

public class ConversationState : Microsoft.Agents.Builder.State.AgentState
type ConversationState = class
    inherit AgentState
Public Class ConversationState
Inherits AgentState
Inheritance
ConversationState

Remarks

Conversation state is available in any turn in a specific conversation, regardless of user, such as in a group conversation.

Constructors

Name Description
ConversationState(IStorage)

Defines a state keyed to a conversation.

Fields

Name Description
ScopeName

Properties

Name Description
Name

The scope name of the state.

(Inherited from AgentState)

Methods

Name Description
ClearState()

Clears the state.

(Inherited from AgentState)
CreateProperty<T>(String)
Obsolete.

Creates a named state property within the scope of a AgentState and returns an accessor for the property.

(Inherited from AgentState)
DeletePropertyValue(String)

Deletes a property from the state cache for this AgentState.

(Inherited from AgentState)
DeleteStateAsync(ITurnContext, CancellationToken)

Deletes state in storage.

(Inherited from AgentState)
DeleteValue(String)

Delete a property.

(Inherited from AgentState)
GetPropertyValue<T>(String)

Gets the value of a property from the state cache for this AgentState.

(Inherited from AgentState)
GetStorageKey(ITurnContext)

Gets the key to use when reading and writing state to and from storage.

GetValue<T>(String, Func<T>)

Get a property value.

(Inherited from AgentState)
HasValue(String)

Checks for the existence of a property.

(Inherited from AgentState)
IsLoaded()

True if state has been loaded.

(Inherited from AgentState)
LoadAsync(ITurnContext, Boolean, CancellationToken)

Populates state from the storage layer.

(Inherited from AgentState)
SaveChangesAsync(ITurnContext, Boolean, CancellationToken)

Writes state to the storage layer.

(Inherited from AgentState)
SetPropertyValue(String, Object)

Sets the value of a property in the state cache for this AgentState.

(Inherited from AgentState)
SetValue<T>(String, T)

Set a property value.

(Inherited from AgentState)
TryGetValue<T>(String, T) (Inherited from AgentState)

Applies to