Skip to content

Commit 6f0c8e5

Browse files
committed
Merge commit 'fa544b80f17de277d4e1fb3edd8666e052403fb6' into ctor
2 parents 2f4ab78 + fa544b8 commit 6f0c8e5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Bson/Serialization/BsonClassMap.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,16 @@ public void SetExtraElementsMember(BsonMemberMap memberMap)
868868

869869
_extraElementsMemberMap = memberMap;
870870
}
871+
/// <summary>
872+
/// Sets the constructor for the object
873+
/// </summary>
874+
/// <param name="constructor"></param>
875+
public BsonClassMap SetConstructor(Func<object> constructor)
876+
{
877+
this._creator = constructor;
878+
return this;
871879

880+
}
872881
/// <summary>
873882
/// Adds a known type to the class map.
874883
/// </summary>
@@ -1308,6 +1317,8 @@ public BsonMemberMap GetMemberMap<TMember>(Expression<Func<TClass, TMember>> mem
13081317
return GetMemberMap(memberName);
13091318
}
13101319

1320+
1321+
13111322
/// <summary>
13121323
/// Creates a member map for the extra elements field and adds it to the class map.
13131324
/// </summary>

0 commit comments

Comments
 (0)