IBotDataStore<T>.SaveAsync Method

Definition

Save a BotData using the ETag. Etag consistency checks If ETag is null or empty, this will set the value if nobody has set it yet If ETag is "*" then this will unconditionally set the value If ETag matches then this will update the value if it is unchanged. If Data is null this removes record, otherwise it stores

public System.Threading.Tasks.Task SaveAsync (Microsoft.Bot.Builder.Dialogs.IAddress key, Microsoft.Bot.Builder.Dialogs.Internals.BotStoreType botStoreType, T data, System.Threading.CancellationToken cancellationToken);
abstract member SaveAsync : Microsoft.Bot.Builder.Dialogs.IAddress * Microsoft.Bot.Builder.Dialogs.Internals.BotStoreType * 'T * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SaveAsync (key As IAddress, botStoreType As BotStoreType, data As T, cancellationToken As CancellationToken) As Task

Parameters

key
IAddress

The key.

botStoreType
BotStoreType

The bot store type.

data
T

The data that should be saved.

cancellationToken
CancellationToken

The cancellation token.

Returns

throw HttpException(HttpStatusCode.PreconditionFailed) if update fails

Applies to