Language

TurnState Class

Definition

Manages a collection of AgentState and provides ability to load and save in parallel.

public class TurnState : Microsoft.Agents.Builder.State.ITurnState
type TurnState = class
    interface ITurnState
Public Class TurnState
Implements ITurnState
Inheritance
TurnState
Implements

Constructors

Name Description
TurnState(IAgentState[])

Initializes a new instance of the TurnState class.

TurnState(IStorage, IAgentState[])

Creates AgentStateSet with default ConversationState and UserState

Properties

Name Description
Conversation
Private
Temp
User

Methods

Name Description
Add(IAgentState)
ClearState(String)
DeleteValue(String)
GetScope(String)
GetScope()
GetValue(String, Func)
HasValue(String)
LoadStateAsync(ITurnContext, Boolean, CancellationToken)

Load all AgentState records in parallel.

SaveStateAsync(ITurnContext, Boolean, CancellationToken)

Save All AgentState changes in parallel.

SetValue(String, Object)
TryGetScope(T)

Applies to