CosmosDbStorage CosmosDbStorage CosmosDbStorage Class

Definition

Implements an CosmosDB based storage provider for a bot.

public class CosmosDbStorage : Microsoft.Bot.Builder.IStorage
type CosmosDbStorage = class
    interface IStorage
Public Class CosmosDbStorage
Implements IStorage
Inheritance
CosmosDbStorageCosmosDbStorageCosmosDbStorage
Implements

Constructors

CosmosDbStorage(CosmosDbStorageOptions) CosmosDbStorage(CosmosDbStorageOptions) CosmosDbStorage(CosmosDbStorageOptions)

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

CosmosDbStorage(IDocumentClient, CosmosDbCustomClientOptions) CosmosDbStorage(IDocumentClient, CosmosDbCustomClientOptions) 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) DeleteAsync(String[], CancellationToken) DeleteAsync(String[], CancellationToken)

Deletes storage items from storage.

ReadAsync(String[], CancellationToken) ReadAsync(String[], CancellationToken) ReadAsync(String[], CancellationToken)

Reads storage items from storage.

SanitizeKey(String) SanitizeKey(String) SanitizeKey(String)

Converts the key into a DocumentID that can be used safely with CosmosDB. The following characters are restricted and cannot be used in the Id property: '/', '', '?', '#' More information at https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnet#remarks.

WriteAsync(IDictionary<String,Object>, CancellationToken) WriteAsync(IDictionary<String,Object>, CancellationToken) WriteAsync(IDictionary<String,Object>, CancellationToken)

Writes storage items to storage.

Extension Methods

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

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

Applies to