CosmosDbPartitionedStorage 构造函数

定义

重载

CosmosDbPartitionedStorage(CosmosDbPartitionedStorageOptions)

初始化 CosmosDbPartitionedStorage 类的新实例。 使用提供的 CosmosDB 凭据、数据库 ID 和容器 ID。

CosmosDbPartitionedStorage(CosmosDbPartitionedStorageOptions, JsonSerializer)

初始化 CosmosDbPartitionedStorage 类的新实例。 使用提供的 CosmosDB 凭据、数据库 ID 和集合 ID。

CosmosDbPartitionedStorage(CosmosDbPartitionedStorageOptions)

初始化 CosmosDbPartitionedStorage 类的新实例。 使用提供的 CosmosDB 凭据、数据库 ID 和容器 ID。

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

参数

cosmosDbStorageOptions
CosmosDbPartitionedStorageOptions

Cosmos DB 分区存储配置选项。

适用于

CosmosDbPartitionedStorage(CosmosDbPartitionedStorageOptions, JsonSerializer)

初始化 CosmosDbPartitionedStorage 类的新实例。 使用提供的 CosmosDB 凭据、数据库 ID 和集合 ID。

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

参数

cosmosDbStorageOptions
CosmosDbPartitionedStorageOptions

Cosmos DB 分区存储配置选项。

jsonSerializer
Newtonsoft.Json.JsonSerializer

如果传入自定义 JsonSerializer,建议使用以下设置:

jsonSerializer.TypeNameHandling = TypeNameHandling.All。

jsonSerializer.NullValueHandling = NullValueHandling.Include。

jsonSerializer.ContractResolver = new DefaultContractResolver()。

jsonSerializer.SerializationBinder = new AllowedTypesSerializationBinder()。

适用于