[CSHARP-656] Prevent registration of BsonValue related serializers Created: 04/Jan/13 Updated: 20/Mar/14 Resolved: 04/Jan/13 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.7 |
| Fix Version/s: | 1.8 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When serializing BsonValues we don't call LookupSerializer for the different serializers needed, we use static instances for performance reasons (no locking contention, no dictionary lookup). Therefore, we should throw an exception if an attempt is made to register a serializer for any of the BsonValue subclasses, since they won't be used anyway and allowing them to be registered is misleading. We do this partially now (you can't register a serializer for BsonDocument), but we need to do it for all BsonValue subclasses. |
| Comments |
| Comment by auto [ 04/Jan/13 ] |
|
Author: {u'date': u'2013-01-04T15:59:25Z', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |