Update DynamicMethod to use module instead of type - #6
Conversation
Replaced `typeof(T)` with `typeof(T).Module` as the fourth parameter in the `DynamicMethod` constructor within `BuildGetPropertyMethod`. This change ensures the dynamic method is associated with the module of the type `T`, improving compatibility and addressing potential issues with dynamic method creation.
|
This fix #5 |
Changed IL code generation in AggregateBindingListView.cs to use OpCodes.Callvirt instead of OpCodes.Call for property getter calls, ensuring correct virtual dispatch.
|
Thanks for digging into this and for the PR — the Why this alone wasn't enough
When There was also a second, independent bug in What we did instead
See b9c2fad and 0917592 for the actual changes, and Thanks again for tracking this down and posting the fix — it saved a lot of |
Replaced
typeof(T)withtypeof(T).Moduleas the fourth parameter in theDynamicMethodconstructor withinBuildGetPropertyMethod. This change ensures the dynamic method is associated with the module of the typeT, improving compatibility and addressing potential issues with dynamic method creation.