You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/MongoDB.Bson/IO/IBsonReader.cs
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ public interface IBsonReader : IDisposable
62
62
/// <summary>
63
63
/// Pops the settings.
64
64
/// </summary>
65
-
voidPopSettings();//TODO Why do we have push and pop methods? They are not used
65
+
voidPopSettings();//TODO Why do we have push and pop methods? They are not used. We should remove them.
66
66
67
67
/// <summary>
68
68
/// Pushes new settings for the reader.
@@ -246,6 +246,14 @@ public interface IBsonReader : IDisposable
246
246
/// <param name="bookmark">The bookmark.</param>
247
247
voidReturnToBookmark(BsonReaderBookmarkbookmark);
248
248
249
+
//TODO I'm not sure why this was not already present, there is already an equivalent in IBsonWriter.
250
+
//We can also avoid adding this to the interface and casting all the occurrences of IBsonReader to BsonReader (the base class for all readers in our codebase).
251
+
//Of course this would be a problem if someone implements IBsonReader in a different way.
252
+
/// <summary>
253
+
/// Gets the settings of the reader.
254
+
/// </summary>
255
+
BsonReaderSettingsSettings{get;}
256
+
249
257
/// <summary>
250
258
/// Skips the name (reader must be positioned on a name).
returnCreateGenericSerializer(serializerTypeDefinition,typeArguments,BsonSerializer.SerializerRegistry);//TODO We can keep this as is
43
+
returnCreateGenericSerializer(serializerTypeDefinition,typeArguments,BsonSerializer.SerializerRegistry);//TODO We can keep this as is? I think in the long run we should remove this overload.
returnCreateSerializer(serializerType,BsonSerializer.SerializerRegistry);//TODO We can keep this as is
68
+
returnCreateSerializer(serializerType,BsonSerializer.SerializerRegistry);//TODO We can keep this as is? I think in the long run we should remove this overload.
:BsonSerializer.LookupDiscriminatorConvention(serializer.ValueType);//TODO We can keep this as is
61
+
:BsonSerializer.LookupDiscriminatorConvention(serializer.ValueType);//TODO We can keep this as is? In the long run this method should have the domain passed.
publicIDiscriminatorConventionDiscriminatorConvention=>_classMap.GetDiscriminatorConvention();//TODO This should be removed, because we need to have the serialization domain.
62
62
63
63
/// <summary>
64
64
/// Gets a value indicating whether this serializer's discriminator is compatible with the object serializer.
@@ -88,7 +88,7 @@ public override TClass Deserialize(BsonDeserializationContext context, BsonDeser
0 commit comments