-
Notifications
You must be signed in to change notification settings - Fork 33
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
Intercept Async Methods, IInterceptor vs IAsyncInterceptor #272
Comments
@ipjohnson Could this be a limitation due to the lack of async support in LINQ expressions ( |
@silkfire is correct that Grace itself can not have async parts in dependency construction. That said Grace doesn't do any interception itself so it should be possible to plug in any interception library be it sync or async. What specifically isn't work? |
Good question. I guess I've been using it so long I forgot who owns the interception code. I'm using (an old copy, I just noticed) of this InterceptionExtensions to hook up interception. It doesn't support the new IAsyncInterceptor interface. Now that I realize where that came from, I can understand your confusion! InterceptionHandler class implements IAsyncInterceptor. It used to implement IInteceptor. exportRegistrationBlock.Intercept(interceptInterface); The constraint on this is for IInterceptor. I guess I need to spend some time on this code, see if I can get it working with IAsyncInterceptor. I may need some help if I get stuck. Thanks, Sean |
Let me know if you run into any trouble, my hope is that it's pretty straight forward. |
I've been using Grace for some time. Thanks! It has been working really well.
I've been implementing IInterceptor, but as our code gets more and more async, I'm finding that this isn't working. I'm using Castle.Core for interception.
Someone has written an extension for Castle.Core to help simplify Async Interception. Castle.Core.AsyncInterceptor. The type I'm using is IAsyncInterceptor, as mentioned in Option 2.
In order for this to work, there needs to be some support in Grace for the new interface, IAsyncInterceptor.
So 2 questions I guess.
Thanks,
Sean
The text was updated successfully, but these errors were encountered: