Class BsonIgnoreIfDefaultAttribute

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Bson.Serialization.Attributes

Assembly

MongoDB.Bson.dll

Indicates whether a field or property equal to the default value should be ignored when serializing this class.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class BsonIgnoreIfDefaultAttribute : Attribute, IBsonMemberMapAttribute

Inheritance

BsonIgnoreIfDefaultAttribute

Implements

Inherited Members

Extension Methods

Constructors

BsonIgnoreIfDefaultAttribute()

Initializes a new instance of the BsonIgnoreIfDefaultAttribute class.

BsonIgnoreIfDefaultAttribute(bool)

Initializes a new instance of the BsonIgnoreIfDefaultAttribute class.

Properties

Value

Gets whether a field or property equal to the default value should be ignored when serializing this class.

Methods

Apply(BsonMemberMap)

Applies a modification to the member map.