ClassMemoryScope class
A memory scope that provides access to the properties of the active dialog. This scope binds to the active dialog and clones its properties for use in memory.
- Extends
Constructors
| Class |
Initializes a new instance of the ClassMemoryScope class. |
Inherited Properties
| include |
|
| name |
Methods
| get |
Gets the backing memory for this scope. |
Inherited Methods
| delete(Dialog |
Deletes the backing memory for a scope. |
| load(Dialog |
Loads a scopes backing memory at the start of a turn. |
| save |
Saves a scopes backing memory at the end of a turn. |
| set |
Changes the backing object for the memory scope. |
Constructor Details
ClassMemoryScope(string)
Initializes a new instance of the ClassMemoryScope class.
new ClassMemoryScope(name?: string)
Parameters
- name
-
string
Name of the scope class. Defaults to ScopePath.class.
Inherited Property Details
includeInSnapshot
name
Method Details
getMemory(DialogContext)
Gets the backing memory for this scope.
function getMemory(dialogContext: DialogContext): object
Parameters
- dialogContext
- DialogContext
The DialogContext object for this turn.
Returns
object
The memory for the scope, containing cloned properties of the active dialog.
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
load(DialogContext)
Loads a scopes backing memory at the start of a turn.
function load(_dialogContext: DialogContext): Promise<void>
Parameters
- _dialogContext
- DialogContext
Current dialog context.
Returns
Promise<void>
Inherited From MemoryScope.load
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