monkey0506 / native-generic-delegates

Generic C# delegates for P/Invoke.
Other
8 stars 0 forks source link

Implement runtime fallbacks for `CallingConvention` parameter #27

Closed monkey0506 closed 1 month ago

monkey0506 commented 1 month ago

As originally described in #21 and #26, this allows for the CallingConvention parameter to be parsed at runtime if the supplied argument is not a compile-time constant expression. This incurs a (very) small performance hit when the implementation class instance is created, but removes the restriction on the argument value at compile-time.