[CSHARP-557] Deprecate many Create methods from BsonDocument object model Created: 07/Sep/12  Updated: 20/Mar/14  Resolved: 08/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

Issue Links:
Related
is related to CSHARP-509 Remove superfluous Create methods and... Closed
Backwards Compatibility: Major Change

 Description   

The BsonDocument object model is a little schizophrenic about whether we want you to call the static Create method or call the various constructors directly. We're going to standardize on calling the constructors except in the few cases where Create still makes sense (which is basically all the Create methods where the parameter type is object).

This is part of a series of changes we are making to simplify the BsonDocument object model.



 Comments   
Comment by Robert Stam [ 08/Dec/12 ]

Pushed to master.

Comment by auto [ 08/Dec/12 ]

Author:

{u'date': u'2012-12-08T03:11:07Z', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-557: Deprecate most BsonValue Create methods (use constructors instead).
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/340ff92964c2f9dc8338565136e8ba80dd952ba7

Comment by Robert Stam [ 04/Dec/12 ]

Reopened to backport to 1.8.

Comment by Robert Stam [ 09/Sep/12 ]

Pushed to x2.0.

Comment by auto [ 09/Sep/12 ]

Author:

{u'date': u'2012-09-07T14:39:27-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}

Message: CSHARP-557: Finished removing some more Create methods (and some now superfluous properties as well).
Branch: x2.0
https://github.com/mongodb/mongo-csharp-driver/commit/47aaff658dfca287d4850245fd6ff7de5d9e376b

Comment by Robert Stam [ 08/Sep/12 ]

In code review.

Comment by Robert Stam [ 07/Sep/12 ]

The following changes are also part of this work:

  • BsonBoolean constructor is now public (since Create method was removed)
  • BsonInt32 no longer keeps a cache of precreated instances
  • BsonInt32 removed properties: MinusOne, Zero, One, Two and Three
  • The official way to get an instance of BsonSymbol is not BsonSymbolTable.Lookup (since Create method was removed)
Generated at Wed Feb 07 21:37:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.