-
Notifications
You must be signed in to change notification settings - Fork 356
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
Safely short circuit function invocation from invocation filter #1310
Comments
It might be useful if the result was also passed in and could be changed by the |
Looks like there's some value here - asp.net action filters appear to have a similar feature short-circuiting if result is set in a filter, we should try to mirror that behavior. |
We're tracking some remaining work items for Filters in this issue #1284. For the initial set of functionality we kept things scoped to get feedback. We have it on our TODO list to look at return values from filters, and I updated the issue to also mention short circuiting so we can explore that. I created a new tracking item here for the all up Result/Cancel feature: #1314 |
That's great, I look forward to the features! Thanks |
Can you please provide status update? |
No progress on this halfway through 2019 now? |
I'm trying to create a
IFunctionInvocationFilter
but I want to be able to safely short circuit the invocation of the function from a filter and pass back a return value.It's currently possible to short circuit it by throwing an exception within the
OnExecutingAsync
method of the filter but sequential filters wont be called and the exception is bubbled up.It would be useful if within the Invocation filters to be able to set a property that allows skipping of the function execution (similar to the MVC framework)
I could throw something together and submit a PR of an example of what I mean?
The text was updated successfully, but these errors were encountered: