-
Notifications
You must be signed in to change notification settings - Fork 494
/
CosmosSerializationOptions.cs
53 lines (49 loc) · 1.69 KB
/
CosmosSerializationOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
#if AZURECORE
namespace Azure.Cosmos.Serialization
#else
namespace Microsoft.Azure.Cosmos
#endif
{
/// <summary>
/// This class provides a way to configure basic
/// serializer settings.
/// </summary>
public sealed class CosmosSerializationOptions
{
/// <summary>
/// Create an instance of CosmosSerializationOptions
/// with the default values for the Cosmos SDK
/// </summary>
public CosmosSerializationOptions()
{
this.IgnoreNullValues = false;
this.Indented = false;
this.PropertyNamingPolicy = CosmosPropertyNamingPolicy.Default;
}
/// <summary>
/// Gets or sets if the serializer should ignore null properties
/// </summary>
/// <remarks>
/// The default value is false
/// </remarks>
public bool IgnoreNullValues { get; set; }
/// <summary>
/// Gets or sets if the serializer should use indentation
/// </summary>
/// <remarks>
/// The default value is false
/// </remarks>
public bool Indented { get; set; }
/// <summary>
/// Gets or sets whether the naming policy used to convert a string-based name to another format,
/// such as a camel-casing format.
/// </summary>
/// <remarks>
/// The default value is CosmosPropertyNamingPolicy.Default
/// </remarks>
public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; }
}
}