Jaa


BotStateMemoryScope<T> Class

Definition

BotStateMemoryScope represents a BotState scoped memory.

public class BotStateMemoryScope<T> : Microsoft.Bot.Builder.Dialogs.Memory.Scopes.MemoryScope where T : BotState
type BotStateMemoryScope<'T (requires 'T :> BotState)> = class
    inherit MemoryScope
Public Class BotStateMemoryScope(Of T)
Inherits MemoryScope

Type Parameters

T

BotState type.

Inheritance
BotStateMemoryScope<T>
Derived

Remarks

This relies on the BotState object being accessible from turnContext.TurnState.Get<T>().

Constructors

BotStateMemoryScope<T>(String)

Initializes a new instance of the BotStateMemoryScope<T> class.

Properties

IncludeInSnapshot

Gets or sets a value indicating whether this memory should be included in snapshot.

(Inherited from MemoryScope)
Name

Gets or sets name of the scope.

(Inherited from MemoryScope)

Methods

DeleteAsync(DialogContext, CancellationToken)

Deletes any state in storage and the cache for this BotState.

GetMemory(DialogContext)

Get the backing memory for this scope.

LoadAsync(DialogContext, Boolean, CancellationToken)

Populates the state cache for this BotState from the storage layer.

SaveChangesAsync(DialogContext, Boolean, CancellationToken)

Writes the state cache for this BotState to the storage layer.

SetMemory(DialogContext, Object)

Changes the backing object for the memory scope.

Applies to