Skip to content

Commit 67495b3

Browse files
committed
Fix for testing
1 parent e793b66 commit 67495b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MongoDB.Driver/MongoCollectionSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ public ReadPreference ReadPreference
124124
/// </summary>
125125
internal IBsonSerializationDomain SerializationDomain
126126
{
127-
get => _serializationDomain.Value;
127+
//QUESTION Is this correct? Normally the domain would be setup by ApplyDefaultValues, but for testing it would not work.
128+
get => _serializationDomain.Value ?? BsonSerializer.DefaultSerializationDomain;
128129
set
129130
{
130131
if (_isFrozen) { throw new InvalidOperationException("MongoCollectionSettings is frozen."); }

0 commit comments

Comments
 (0)