[CSHARP-1114] Remove global dependencies in Bson Library Created: 20/Nov/14  Updated: 07/Apr/23

Status: Backlog
Project: C# Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Craig Wilson Assignee: Unassigned
Resolution: Unresolved Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

Currently, there exists a couple of global caches of serializers, class maps, and discriminators. We should remove the dependency on the global caches while still leaving the global caches there for backwards compatibility.



 Comments   
Comment by Cy [ 01/May/19 ]

A global cache causes all kinds of problems with testing where serialization settings carry from test to test because of the nature of how static variables work.

Comment by Federico Ceccatto [ 18/Jul/17 ]

+1 to this, there's all kinds of contortions needed if you need to maintain multiple MongoDB "backends" in the same process with potentially different serialization approaches. ConventionRegistry is another static that should be locally scoped.

Generated at Wed Feb 07 21:38:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.