Share via


TurnState.SaveStateAsync(ITurnContext, Boolean, CancellationToken) Method

Definition

Save All AgentState changes in parallel.

public System.Threading.Tasks.Task SaveStateAsync(Microsoft.Agents.Builder.ITurnContext turnContext, bool force = false, System.Threading.CancellationToken cancellationToken = default);
abstract member SaveStateAsync : Microsoft.Agents.Builder.ITurnContext * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SaveStateAsync : Microsoft.Agents.Builder.ITurnContext * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SaveStateAsync (turnContext As ITurnContext, Optional force As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

turnContext
ITurnContext

turn context.

force
Boolean

should data be forced to save even if no change were detected.

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.

Implements

Applies to