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
DictionaryRepresentationThe representation to use for the Dictionary.
Properties
Representation
Gets or sets the external representation.
public DictionaryRepresentation Representation { get; set; }
Property Value
Methods
Apply(IBsonSerializer)
Reconfigures the specified serializer by applying this attribute to it.
protected override IBsonSerializer Apply(IBsonSerializer serializer)
Parameters
serializer
IBsonSerializerThe serializer.
Returns
- IBsonSerializer
A reconfigured serializer.