Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing changes from a0678c379b18afb04df8145fbba465b86fe308d9 #4066

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,24 @@ public class DatabaseOptions
/// Gets or sets json serializer options.
/// </summary>
/// <remarks>
/// This will be used only if <see cref="OverrideSerialization"/> is enabled.
/// Default is the default <see cref="JsonSerializerOptions" />.
/// Those options will be used by compatible APIs to serialize input before sending to server and deserialize output.
/// This includes sent/received documents.
/// </remarks>
public JsonSerializerOptions JsonSerializerOptions { get; set; } = new();

/// <summary>
/// Gets or sets a value indicating whether serialization overridden.
/// </summary>
/// <remarks>
/// Default is <see langword="true"/>.
/// When enabled, System.Text.Json based serialization will be configured with
/// settings defined in <see cref="JsonSerializerOptions"/>.
/// </remarks>
[Experimental("New feature.")]
public bool OverrideSerialization { get; set; } = true;

/// <summary>
/// Gets or sets a list of preferred regions used for SDK to define failover order for global database.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void TestDefaults()

Assert.Equal(string.Empty, config.DatabaseName);
Throughput.Unlimited.Should().Be(config.Throughput);
Assert.True(config.OverrideSerialization);
}

[Fact]
Expand Down