-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
It would be nice if there was a way to override default serializers for primitive types. While it can be worked around by registering serializers before the sctor of BsonSerializer executes or by using Reflection, a more straight-forward way would probably be to include a version of BsonSerializer.RegisterSerializer that allows to overwrite serializers for already covered types.
This stackoverflow question might be able to provide more context (note, I am not the original poster of said question): http://stackoverflow.com/questions/12201812/mongodb-override-default-serializer-for-a-c-sharp-primitive-type/12636123#comment17048789_12636123
- duplicates
-
CSHARP-583 Allow Injection of custom primitive serializers into existing Seralization Stack
- Closed