Class BsonIgnoreExtraElementsAttribute
- Namespace
- MongoDB.Bson.Serialization.Attributes
- Assembly
- MongoDB.Bson.dll
Specifies whether extra elements should be ignored when this class is deserialized.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)]
public class BsonIgnoreExtraElementsAttribute : Attribute, IBsonClassMapAttribute
- Inheritance
-
BsonIgnoreExtraElementsAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
BsonIgnoreExtraElementsAttribute()
Initializes a new instance of the BsonIgnoreExtraElementsAttribute class.
public BsonIgnoreExtraElementsAttribute()
BsonIgnoreExtraElementsAttribute(bool)
Initializes a new instance of the BsonIgnoreExtraElementsAttribute class.
public BsonIgnoreExtraElementsAttribute(bool ignoreExtraElements)
Parameters
ignoreExtraElements
boolWhether extra elements should be ignored when this class is deserialized.
Properties
IgnoreExtraElements
Gets whether extra elements should be ignored when this class is deserialized.
public bool IgnoreExtraElements { get; }
Property Value
Inherited
Gets whether extra elements should also be ignored when any class derived from this one is deserialized.
public bool Inherited { get; set; }
Property Value
Methods
Apply(BsonClassMap)
Applies a modification to the class map.
public void Apply(BsonClassMap classMap)
Parameters
classMap
BsonClassMapThe class map.