[CSHARP-520] Add a BsonSerializer attribute that can be attached to either a class or a property/field to specify which serializer to use Created: 05/Jul/12  Updated: 20/Mar/14  Resolved: 10/Jul/12

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

Type: New Feature 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:
Depends
is depended on by CSHARP-517 MongoServer static constructor is not... Closed

 Description   

Add a new BsonSerializer attribute that can be used at either the class or the property/field level to specify a serializer.

For example:

[BsonSerializer(typeof(CSerializer))]
public class C
{
    ....
}
 
public class D
{
    ....
    [BsonSerializer(typeof(TSerializer))]
    public T X { get; set; }
}



 Comments   
Comment by auto [ 06/Jul/12 ]

Author:

{u'date': u'2012-07-06T14:33:26-07:00', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}

Message: CSHARP-520: changed CreateSerializer method to internal.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/6abc176587dd57ef3dbef2ce049d4f894fcb3305

Comment by auto [ 06/Jul/12 ]

Author:

{u'date': u'2012-07-05T13:01:44-07:00', u'email': u'robert@10gen.com', u'name': u'Robert Stam'}

Message: CSHARP-520: Added support for new BsonSerializer attribute at both the class and the property/field level.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/cde42f76f9470b13bc1965cce63c8c15dc177d3a

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