Share via


BotStateMemoryScope<T>.SaveChangesAsync Method

Definition

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

public override System.Threading.Tasks.Task SaveChangesAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, bool force = false, System.Threading.CancellationToken cancellationToken = default);
override this.SaveChangesAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function SaveChangesAsync (dialogContext As DialogContext, Optional force As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

dialogContext
DialogContext

The dialog context 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.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Applies to