-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Feature Request
-
None
-
Environment:Win7 x64, latest C# Driver trunk
I have noticed that latest C# Driver has some failing tests, for structure support.
I have tried to fix it by myself, but I hit some framework limitations.
So, here they are, to save your's time:
1. IL/Expression Setters inside BsonMemberMap are not working for structs, because structs are passed by value (and not by ref)
2. I have tried to switch setter syntax from Action<object, object> to custom delegate that looks like Action<ref object, object>, but I came across FW limitations
- Dynamic method (used for IL code) does not support not REF, nor OUT modifiers
- I haven't found how to use LINQ.Expressions builder, to support REF or OUT modifiers
- There is a way, to use Func<object, object, object> modifiers, that returns modified struct each time, but IMO it would be painful for GC