@@ -94,16 +94,9 @@ public object Wrapped
9494 public static BsonDocumentWrapper Create < TNominalType > ( TNominalType value ) =>
9595 Create ( value , BsonSerializer . DefaultSerializationDomain ) ;
9696
97- /// <summary>
98- /// //TODO
99- /// </summary>
100- /// <param name="value"></param>
101- /// <param name="domain"></param>
102- /// <typeparam name="TNominalType"></typeparam>
103- /// <returns></returns>
104- internal static BsonDocumentWrapper Create < TNominalType > ( TNominalType value , IBsonSerializationDomain domain )
97+ internal static BsonDocumentWrapper Create < TNominalType > ( TNominalType value , IBsonSerializationDomain serializationDomain )
10598 {
106- return Create ( typeof ( TNominalType ) , value , domain ) ;
99+ return Create ( typeof ( TNominalType ) , value , serializationDomain ) ;
107100 }
108101
109102 /// <summary>
@@ -115,13 +108,6 @@ internal static BsonDocumentWrapper Create<TNominalType>(TNominalType value, IBs
115108 public static BsonDocumentWrapper Create ( Type nominalType , object value ) =>
116109 Create ( nominalType , value , BsonSerializer . DefaultSerializationDomain ) ;
117110
118- /// <summary>
119- /// //TODO
120- /// </summary>
121- /// <param name="nominalType"></param>
122- /// <param name="value"></param>
123- /// <param name="domain"></param>
124- /// <returns></returns>
125111 internal static BsonDocumentWrapper Create ( Type nominalType , object value , IBsonSerializationDomain domain )
126112 {
127113 var serializer = domain . LookupSerializer ( nominalType ) ;
@@ -220,7 +206,8 @@ protected override IEnumerable<BsonElement> Materialize()
220206 var writerSettings = BsonDocumentWriterSettings . Defaults ;
221207 using ( var bsonWriter = new BsonDocumentWriter ( bsonDocument , writerSettings ) )
222208 {
223- var context = BsonSerializationContext . CreateRoot ( bsonWriter ) ;
209+ //QUESTION Is it correct we only need a default domain here?
210+ var context = BsonSerializationContext . CreateRoot ( bsonWriter , BsonSerializer . DefaultSerializationDomain ) ;
224211 _serializer . Serialize ( context , _wrapped ) ;
225212 }
226213
0 commit comments