ConversationMemoryScope class

Memory that's scoped to the current conversation.

Extends

Constructors

ConversationMemoryScope()

Initializes a new instance of the ConversationMemoryScope class.

Inherited Properties

includeInSnapshot

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

name

Gets or sets name of the scope

Inherited Methods

delete(DialogContext)

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

getMemory(DialogContext)

Get the backing memory for this scope.

load(DialogContext, boolean)

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

saveChanges(DialogContext, boolean)

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

setMemory(DialogContext, object)

Changes the backing object for the memory scope.

Constructor Details

ConversationMemoryScope()

Initializes a new instance of the ConversationMemoryScope class.

new ConversationMemoryScope()

Inherited Property Details

includeInSnapshot

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

includeInSnapshot: boolean

Property Value

boolean

Inherited From MemoryScope.includeInSnapshot

name

Gets or sets name of the scope

name: string

Property Value

string

Inherited From MemoryScope.name

Inherited Method Details

delete(DialogContext)

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

function delete(_dc: DialogContext): Promise<void>

Parameters

_dc
DialogContext

The DialogContext object for this turn.

Returns

Promise<void>

A Promise that represents the work queued to execute.

Inherited From BotStateMemoryScope.delete

getMemory(DialogContext)

Get the backing memory for this scope.

function getMemory(dc: DialogContext): object

Parameters

dc
DialogContext

current dialog context.

Returns

object

Memory for the scope.

Inherited From BotStateMemoryScope.getMemory

load(DialogContext, boolean)

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

function load(dc: DialogContext, force?: boolean): Promise<void>

Parameters

dc
DialogContext

The DialogContext object for this turn.

force

boolean

Optional, true to overwrite any existing state cache; or false to load state from storage only if the cache doesn't already exist.

Returns

Promise<void>

A Promise that represents the work queued to execute.

Inherited From BotStateMemoryScope.load

saveChanges(DialogContext, boolean)

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

function saveChanges(dc: DialogContext, force?: boolean): Promise<void>

Parameters

dc
DialogContext

The DialogContext object for this turn.

force

boolean

Optional, true to save the state cache to storage; or false to save state to storage only if a property in the cache has changed.

Returns

Promise<void>

A Promise that represents the work queued to execute.

Inherited From BotStateMemoryScope.saveChanges

setMemory(DialogContext, object)

Changes the backing object for the memory scope.

function setMemory(dc: DialogContext, _memory: object)

Parameters

dc
DialogContext

current dialog context

_memory

object

memory

Inherited From BotStateMemoryScope.setMemory