[CSHARP-562] Deprecate ReadFrom/WriteTo from the BsonDocument object model and standardize on using serialization Created: 08/Sep/12  Updated: 14/May/14  Resolved: 12/Dec/12

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

Type: Improvement Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change

 Description   

There is a lot of overlap between the ReadFrom/WriteTo methods in the BsonDocument object model and the serialization machinery. Attempt to remove ReadFrom/WriteTo from the BsonDocument object model and see if the serialization machinery alone can replace it. Why have two overlapping ways of doing the same thing?



 Comments   
Comment by auto [ 12/Dec/12 ]

Author:

{u'date': u'2012-12-12T15:48:38Z', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-562: Change GetDocumentId in BsonDocumentSerializer to always return an instance of BsonValue.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/cf64c559a5ee451fed75064208dc2b8e88cbbc85

Comment by auto [ 12/Dec/12 ]

Author:

{u'date': u'2012-12-11T22:01:02Z', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-562: Deprecate ReadFrom/WriteTo in the BsonDocument object model.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/c25e484169e03a69c53d8db6570ad18c837e441e

Comment by Robert Stam [ 11/Dec/12 ]

Reopened to backport to 1.8.

ReadFrom/WriteTo will be deprecated (not removed) in 1.8 and will forward calls to the serializers.

Comment by Robert Stam [ 10/Sep/12 ]

Pushed to x2.0.

Comment by Robert Stam [ 10/Sep/12 ]

In code review.

Comment by auto [ 10/Sep/12 ]

Author:

{u'date': u'2012-09-09T10:14:56-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-562: move _csharpnull handling to BsonClassMapSerializer, which is the only class that really cares about this trick.
Branch: x2.0
https://github.com/mongodb/mongo-csharp-driver/commit/cc29de8d1eac89f27cf03ce5d4bb5a6ffeb4a394

Comment by auto [ 10/Sep/12 ]

Author:

{u'date': u'2012-09-08T17:20:19-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-562: remove ReadFrom/WriteTo and all other serialization code from the BsonDocument object model. Instead use the standard serialization machinery.
Branch: x2.0
https://github.com/mongodb/mongo-csharp-driver/commit/8fc459a20c4e48282b44d9357e85e8f0716697e4

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