Table of Contents

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

type Type

The type of the member.

defaultValue object

The default value for members of this type.

Methods

Apply(BsonMemberMap)

Applies a modification to the member map.

public void Apply(BsonMemberMap memberMap)

Parameters

memberMap BsonMemberMap

The member map.