Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plans to support Async methods in the IMethodInterceptor #2

Open
StevenRasmussen opened this issue Feb 9, 2019 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@StevenRasmussen
Copy link

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?

@Panallox
Copy link
Owner

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

@Panallox Panallox added the enhancement New feature or request label Feb 10, 2019
@StevenRasmussen
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants