Closed khorvat closed 11 years ago
This SO answer shows how you can add async operations after a call to an async method, but there isn't a way to do async operations before the call.
To support this, we'd need something like InterceptAsync. WebAPI has a very similar design in their delegating handlers.
I have had to hack the extension in order for this to work, you can find more details here - http://stackoverflow.com/a/17789809, and Forked repository here - https://github.com/khorvat/ninject.extensions.interception
I have taken a look at your implementation and wondering if async/await calls are possible in BeforeInvoke ?
Thanks
What do you want to await in BeforeInvoke? The task that has not even created and started? You would wait infinit in this case.
Let's say you have some preprocessing for few intercepted services and that you have an async operation in BeforeInvoke (e.g. reading from disk, distributed cache or something) you are not possible to await that operation.
Thoughts ?
Hi,
is there any plans to introduce InterceptAsync or something similar in Interception extension in order to support awaiting asynchronous calls ?
Thanks