Table of Contents

Class BsonDictionaryOptionsAttribute

Namespace
MongoDB.Bson.Serialization.Attributes
Assembly
MongoDB.Bson.dll

Specifies serialization options for a Dictionary field or property.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class BsonDictionaryOptionsAttribute : BsonSerializationOptionsAttribute, IBsonMemberMapAttribute
Inheritance
BsonDictionaryOptionsAttribute
Implements
Inherited Members
Extension Methods

Constructors

BsonDictionaryOptionsAttribute()

Initializes a new instance of the BsonDictionaryOptionsAttribute class.

public BsonDictionaryOptionsAttribute()

BsonDictionaryOptionsAttribute(DictionaryRepresentation)

Initializes a new instance of the BsonDictionaryOptionsAttribute class.

public BsonDictionaryOptionsAttribute(DictionaryRepresentation representation)

Parameters

representation DictionaryRepresentation

The representation to use for the Dictionary.

Properties

Representation

Gets or sets the external representation.

public DictionaryRepresentation Representation { get; set; }

Property Value

DictionaryRepresentation

Methods

Apply(IBsonSerializer)

Reconfigures the specified serializer by applying this attribute to it.

protected override IBsonSerializer Apply(IBsonSerializer serializer)

Parameters

serializer IBsonSerializer

The serializer.

Returns

IBsonSerializer

A reconfigured serializer.