Search documentationEsc

RepositorySerializationOptions

The serialization options for the Cosmos DB repository.

Namespace: Microsoft.Azure.CosmosRepository.Options
Kind: class

The serialization options for the Cosmos DB repository. These are mapped to the SerializerOptions object.

public class RepositorySerializationOptions

Example

Members

Propertys

RepositorySerializationOptions.IgnoreNullValues

Gets or sets if the serializer should ignore null properties.

public bool IgnoreNullValues { get; set; }

ReturnsBoolean

The default value is false

RepositorySerializationOptions.Indented

Gets or sets if the serializer should use indentation.

public bool Indented { get; set; }

ReturnsBoolean

The default value is false

RepositorySerializationOptions.PropertyNamingPolicy

Gets or sets whether the naming policy used to convert a string-based name to another format, such as a camel-casing format.

public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; }

ReturnsCosmosPropertyNamingPolicy

The default value is CamelCase.

Operators

RepositorySerializationOptions.implicit operator CosmosSerializationOptions(RepositorySerializationOptions?)

Defines an implicit operator for which allows the RepositorySerializationOptions to be converted to a CosmosSerializationOptions.

public static implicit operator CosmosSerializationOptions(RepositorySerializationOptions? options)

Parameters

NameTypeDescription
optionsRepositorySerializationOptionsThe source options to map from.

ReturnsCosmosSerializationOptions

RepositorySerializationOptions.implicit operator CosmosLinqSerializerOptions(RepositorySerializationOptions?)

Defines an implicit operator for which allows the RepositorySerializationOptions to be converted to a CosmosLinqSerializerOptions.

public static implicit operator CosmosLinqSerializerOptions(RepositorySerializationOptions? options)

Parameters

NameTypeDescription
optionsRepositorySerializationOptionsThe source options to map from.

ReturnsCosmosLinqSerializerOptions