Share via


SettingsMemoryScope class

Abstract base class for all memory scopes.

Extends

Constructors

SettingsMemoryScope(Record<string, unknown>)

Initializes a new instance of the SettingsMemoryScope class.

Inherited Properties

includeInSnapshot
name

Methods

getMemory(DialogContext)

Gets the backing memory for this scope.

load(DialogContext)

Inherited Methods

delete(DialogContext)

Deletes the backing memory for a scope.

saveChanges(DialogContext)

Saves a scopes backing memory at the end of a turn.

setMemory(DialogContext, object)

Changes the backing object for the memory scope.

Constructor Details

SettingsMemoryScope(Record<string, unknown>)

Initializes a new instance of the SettingsMemoryScope class.

new SettingsMemoryScope(initialSettings?: Record<string, unknown>)

Parameters

initialSettings

Record<string, unknown>

initial set of settings to supply

Inherited Property Details

includeInSnapshot

includeInSnapshot: boolean

Property Value

boolean

Inherited From MemoryScope.includeInSnapshot

name

name: string

Property Value

string

Inherited From MemoryScope.name

Method Details

getMemory(DialogContext)

Gets the backing memory for this scope.

function getMemory(dialogContext: DialogContext): Record<string, unknown>

Parameters

dialogContext
DialogContext

The DialogContext object for this turn.

Returns

Record<string, unknown>

The memory for the scope.

load(DialogContext)

function load(dialogContext: DialogContext): Promise<void>

Parameters

dialogContext
DialogContext

Current dialog context.

Returns

Promise<void>

Inherited Method Details

delete(DialogContext)

Deletes the backing memory for a scope.

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

Parameters

_dialogContext
DialogContext

Current dialog context.

Returns

Promise<void>

Inherited From MemoryScope.delete

saveChanges(DialogContext)

Saves a scopes backing memory at the end of a turn.

function saveChanges(_dialogContext: DialogContext): Promise<void>

Parameters

_dialogContext
DialogContext

Current dialog context.

Returns

Promise<void>

Inherited From MemoryScope.saveChanges

setMemory(DialogContext, object)

Changes the backing object for the memory scope.

function setMemory(_dialogContext: DialogContext, _memory: object)

Parameters

_dialogContext
DialogContext

Current dialog context

_memory

object

memory to assign

Inherited From MemoryScope.setMemory