Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4391

BsonClassMap should support deserializing structs using a constructor

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 2.19.0
    • Affects Version/s: 2.18.0
    • Component/s: Serialization
    • None

      BsonClassMap does not support deserializing structs because of boxing.

      But boxing is only really an issue when trying to set property values (because the value is set on a boxed value that gets thrown away).

      But if a struct provides the proper constructor(s) BsonClassMap can be modified to support deserializing structs using a constructor, as opposed to trying to set property values.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: