[CSHARP-4391] BsonClassMap should support deserializing structs using a constructor Created: 28/Oct/22 Updated: 01/Nov/22 Resolved: 01/Nov/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Serialization |
| Affects Version/s: | 2.18.0 |
| Fix Version/s: | 2.19.0 |
| Type: | New Feature | Priority: | Unknown |
| 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: |
|
||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 01/Nov/22 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |