Class MemberDefaultValueConvention
- Namespace
- MongoDB.Bson.Serialization.Conventions
- Assembly
- MongoDB.Bson.dll
A convention that sets the default value for members of a given type.
public class MemberDefaultValueConvention : ConventionBase, IMemberMapConvention, IConvention
- Inheritance
-
MemberDefaultValueConvention
- Implements
- Inherited Members
- Extension Methods
Constructors
MemberDefaultValueConvention(Type, object)
Initializes a new instance of the MemberDefaultValueConvention class.
public MemberDefaultValueConvention(Type type, object defaultValue)
Parameters
Methods
Apply(BsonMemberMap)
Applies a modification to the member map.
public void Apply(BsonMemberMap memberMap)
Parameters
memberMap
BsonMemberMapThe member map.