Skip to content

Instantly share code, notes, and snippets.

/// <summary>
/// Ugly reflection hack to allow unsecure SSL.
/// </summary>
/// <returns></returns>
private CosmosClient CreateNoSslCosmosClient()
{
var db = new CosmosClientBuilder($"https://localhost:{_hostPort}", "dummy key")
.WithConnectionModeGateway()
.WithSerializerOptions(
new CosmosSerializationOptions() { PropertyNamingPolicy = CosmosPropertyNamingPolicy.CamelCase }