CosmosDbStorage Constructors

Definition

Overloads

CosmosDbStorage(CosmosDbStorageOptions)

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.

CosmosDbStorage(CosmosDbStorageOptions, JsonSerializer)

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

CosmosDbStorage(CosmosDbStorageOptions)

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

public CosmosDbStorage (Microsoft.Bot.Builder.Azure.CosmosDbStorageOptions cosmosDbStorageOptions);
new Microsoft.Bot.Builder.Azure.CosmosDbStorage : Microsoft.Bot.Builder.Azure.CosmosDbStorageOptions -> Microsoft.Bot.Builder.Azure.CosmosDbStorage
Public Sub New (cosmosDbStorageOptions As CosmosDbStorageOptions)

Parameters

cosmosDbStorageOptions
CosmosDbStorageOptions

Cosmos DB storage configuration options.

Applies to

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.

public CosmosDbStorage (Microsoft.Azure.Documents.IDocumentClient documentClient, Microsoft.Bot.Builder.Azure.CosmosDbCustomClientOptions cosmosDbCustomClientOptions);
new Microsoft.Bot.Builder.Azure.CosmosDbStorage : Microsoft.Azure.Documents.IDocumentClient * Microsoft.Bot.Builder.Azure.CosmosDbCustomClientOptions -> Microsoft.Bot.Builder.Azure.CosmosDbStorage
Public Sub New (documentClient As IDocumentClient, cosmosDbCustomClientOptions As CosmosDbCustomClientOptions)

Parameters

documentClient
IDocumentClient

The custom implementation of IDocumentClient.

cosmosDbCustomClientOptions
CosmosDbCustomClientOptions

Custom client configuration options.

Applies to

CosmosDbStorage(CosmosDbStorageOptions, JsonSerializer)

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

public CosmosDbStorage (Microsoft.Bot.Builder.Azure.CosmosDbStorageOptions cosmosDbStorageOptions, Newtonsoft.Json.JsonSerializer jsonSerializer);
new Microsoft.Bot.Builder.Azure.CosmosDbStorage : Microsoft.Bot.Builder.Azure.CosmosDbStorageOptions * Newtonsoft.Json.JsonSerializer -> Microsoft.Bot.Builder.Azure.CosmosDbStorage
Public Sub New (cosmosDbStorageOptions As CosmosDbStorageOptions, jsonSerializer As JsonSerializer)

Parameters

cosmosDbStorageOptions
CosmosDbStorageOptions

Cosmos DB storage configuration options.

jsonSerializer
Newtonsoft.Json.JsonSerializer

If passing in a custom JsonSerializer, we recommend the following settings:

jsonSerializer.TypeNameHandling = TypeNameHandling.All.

jsonSerializer.NullValueHandling = NullValueHandling.Include.

jsonSerializer.ContractResolver = new DefaultContractResolver().

Applies to