[CSHARP-170] ObservableCollection<T> is incorrectly serialized with BsonClassMapSerializer Created: 15/Feb/11  Updated: 02/Apr/15  Resolved: 15/Feb/11

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 0.11
Fix Version/s: 1.0

Type: Bug Priority: Minor - P4
Reporter: Kevin Lewis Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Properties with a runtime type of ObservableCollection<T> get serialized with BsonClassMapSerializer which causes the items to not be serialized. Registering EnumerableSerializer<> to be used fixes the problem. I have submitted the following pull request for consideration:
https://github.com/mongodb/mongo-csharp-driver/pull/45



 Comments   
Comment by Robert Stam [ 15/Feb/11 ]

Resolved by pulling in contributed fix. Also tweaked fix to handle Collection<T> in the same way. Thanks for the contribution.

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