-
Type: Task
-
Resolution: Done
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Dotnet Drivers
-
Not Needed
-
Right now some of the visitors in the LINQ provider are hard-coded to look for ObjectSerializer and if the serializer is this type then look for the DiscriminatorConvention property. This prevents other serializers from being able to expose this and limits them to the static BsonSerializer registry.
I propose introducing a new interface such as ISpecifyDiscriminatorConvention which has a single property:
IDiscriminatorConvention DiscriminatorConvention { get; }}
The visitors can then look for this interface instead. ObjectSerializer can implement it as can anyone else.
- is related to
-
CSHARP-5286 Add IHierarchicalDiscriminatorConvention and IScalarDiscriminatorConvention interfaces
- Closed