RandomEngy / PipeMethodCalls

Lightweight .NET Standard 2.0 library for method calls over named pipes for IPC. Supports two-way communication with callbacks.
https://www.nuget.org/packages/PipeMethodCalls
MIT License
145 stars 24 forks source link

Method not found errors from F# - GetMethod vs GetRuntimeMethods #10

Closed AndrewIOM closed 3 years ago

AndrewIOM commented 3 years ago

What We are using the library in fslaborg/RProvider, with both F# Client and Server using a shared interface.

Steps to Reproduce From RProvider, change the dependency on PipeMethodCalls from my fork of PipeMethodCalls to the current published nuget package. Using this current PipeMethodCalls library results in an error: 'Method not found in interface IRInteropServer.'

Possible Fix I forked this library and changed the call in PipeMethodCalls/RequestHandler/RequestHandler.cs from GetMethod() to GetRuntimeMethods(). The method is then discovered correctly.

RandomEngy commented 3 years ago

That method is a little slower but that's OK since both are plenty fast. Version 3.0.4 uses GetRuntimeMethods().

AndrewIOM commented 3 years ago

Thanks for the fix, and the library!