Class BsonIgnoreIfNullAttribute
- Namespace
- MongoDB.Bson.Serialization.Attributes
- Assembly
- MongoDB.Bson.dll
Indicates whether a field or property equal to null should be ignored when serializing this class.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public class BsonIgnoreIfNullAttribute : Attribute, IBsonMemberMapAttribute
- Inheritance
-
BsonIgnoreIfNullAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
BsonIgnoreIfNullAttribute()
Initializes a new instance of the BsonIgnoreIfNullAttribute class.
public BsonIgnoreIfNullAttribute()
BsonIgnoreIfNullAttribute(bool)
Initializes a new instance of the BsonIgnoreIfNullAttribute class.
public BsonIgnoreIfNullAttribute(bool value)
Parameters
value
boolWhether a field or property equal to null should be ignored when serializing this class.
Properties
Value
Gets whether a field or property equal to null should be ignored when serializing this class.
public bool Value { get; }
Property Value
Methods
Apply(BsonMemberMap)
Applies a modification to the member map.
public void Apply(BsonMemberMap memberMap)
Parameters
memberMap
BsonMemberMapThe member map.