[CSHARP-515] ReadOnlyCollection<> should be mapped to EnumerableSerializer<> by default Created: 02/Jul/12  Updated: 20/Mar/14  Resolved: 12/Jul/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.4.2
Fix Version/s: 1.6

Type: Improvement Priority: Minor - P4
Reporter: Roman Pacheco Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

System.Collections.ObjectModel.ReadOnlyCollection<> should be mapped to EnumerableSerializer<> in the BsonDefaultSerializer's static constructor.



 Comments   
Comment by auto [ 12/Jul/12 ]

Author:

{u'date': u'2012-07-12T11:39:52-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-515: only register a discriminator for subclasses of ReadOnlyCollection<T> and not for itself.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/93ae0820958c3003af4756950e9e28417a113990

Comment by auto [ 12/Jul/12 ]

Author:

{u'date': u'2012-07-12T11:33:47-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-515: Add support for serializing and deserializing ReadOnlyCollection<T>.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/381c7e8ed176376c6255feeef70ed93e338a432c

Comment by Craig Wilson [ 02/Jul/12 ]

Hi Roman. This is already accounted for in version 1.5. Persistence to the database works fine. However, hydration from the database does NOT work in 1.5. It is too late to get it into 1.5, but I'll schedule it for 1.6 as a special case that will need to be accounted for.

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