CosmosDbStorage Class

Definition

Caution

This class is deprecated. Please use CosmosDbPartitionedStorage instead.

Implements an CosmosDB based storage provider for a bot.

[System.Obsolete("This class is deprecated. Please use CosmosDbPartitionedStorage instead.", false)]
public class CosmosDbStorage : IDisposable, Microsoft.Bot.Builder.IStorage
[<System.Obsolete("This class is deprecated. Please use CosmosDbPartitionedStorage instead.", false)>]
type CosmosDbStorage = class
    interface IStorage
    interface IDisposable
Public Class CosmosDbStorage
Implements IDisposable, IStorage
Inheritance
CosmosDbStorage
Attributes
Implements

Constructors

CosmosDbStorage(CosmosDbStorageOptions)

Initializes a new instance of the CosmosDbStorage class. using the provided CosmosDB credentials, database ID, and collection ID.

CosmosDbStorage(CosmosDbStorageOptions, JsonSerializer)

Initializes a new instance of the CosmosDbStorage class. using the provided CosmosDB credentials, database ID, and collection ID.

CosmosDbStorage(IDocumentClient, CosmosDbCustomClientOptions)

Initializes a new instance of the CosmosDbStorage class. This constructor should only be used if the default behavior of the DocumentClient needs to be changed. The CosmosDbStorage(CosmosDbStorageOptions) constructor is preferer for most cases.

Methods

DeleteAsync(String[], CancellationToken)

Deletes storage items from storage.

Dispose()

Disposes the object instance and releases any related objects owned by the class.

Dispose(Boolean)

Disposes objects used by the class.

ReadAsync(String[], CancellationToken)

Reads storage items from storage.

SanitizeKey(String)
Obsolete.

Escapes a given key to be compatible for use with Cosmos DB.

WriteAsync(IDictionary<String,Object>, CancellationToken)

Writes storage items to storage.

Extension Methods

ReadAsync<TStoreItem>(IStorage, String[], CancellationToken)

Gets and strongly types a collection of IStoreItem objects from state storage.

Applies to