Table of Contents

Method SetDefaultValue

Namespace
MongoDB.Bson.Serialization
Assembly
MongoDB.Bson.dll

SetDefaultValue(Func<object>)

Sets the default value creator.

public BsonMemberMap SetDefaultValue(Func<object> defaultValueCreator)

Parameters

defaultValueCreator Func<object>

The default value creator (note: the supplied delegate must be thread safe).

Returns

BsonMemberMap

The member map.

SetDefaultValue(object)

Sets the default value.

public BsonMemberMap SetDefaultValue(object defaultValue)

Parameters

defaultValue object

The default value.

Returns

BsonMemberMap

The member map.