Any plans to support Async methods in the IMethodInterceptor
Hello,
I just came across this project and was wondering if you have any plans to support async versions of the methods on your IMethodInterceptor interface, ie:
Task OnEnterAsync(MethodInterceptionArgs e)Task OnExceptionAsync(MethodInterceptionArgs e, Exception ex)Task OnExitAsync(MethodInterceptionArgs e)
Perhaps it could be a separate interface called IAsyncMethodInterceptor?
Hi there,
Yes this is certainly something that's been on the radar. I do have intentions to add support for async methods, I believe there are some good examples of how to accomplish it out there so I'll try and dedicate some time to getting it working.
Thanks
That would be extremely helpful! More and more apps are moving towards using async/await and so it makes it difficult to incorporate any sort of complex logic into these methods if all of the underlying method calls use async as well. I had to convert all of the methods I was calling in the 'OnEnter' method to be synchronous.