-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Support late bound results #34300
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
Support late bound results #34300
Conversation
- Add support for object, Task<object> and ValueTask<object> result types. We can detect that pattern and genererate calls into a helper that does a bunch of runtime checks for known result types. - Added tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well remove the // TODO: Handle custom awaitables
comment 😄
Should we treat aspnetcore/src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs Lines 237 to 241 in 12c57a5
|
Yes |
Though I wonder what happens if you leave it as object. I'll check. |
- Remove unwrapping and gotos for consistency with static return types
We still need to do this for F# |
object
,Task<object>
andValueTask<object>
result types. We can detect that pattern and generate calls into a helper that does a bunch of runtime checks for known result types.Task<?>
orValueTask<?>
. the result will be a JSON serializedTask<T>
andValueTask<T>
Fixes #34247