-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Detect services based on service provider #32737
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davidfowl
added
the
api-ready-for-review
API is ready for formal API review - https://github.com/dotnet/apireviews
label
May 15, 2021
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
ghost
added
the
area-runtime
label
May 15, 2021
pranavkm
approved these changes
May 15, 2021
pranavkm
added
api-approved
API was approved in API review, it can be implemented
and removed
api-ready-for-review
API is ready for formal API review - https://github.com/dotnet/apireviews
labels
May 17, 2021
pranavkm
reviewed
May 17, 2021
davidfowl
added
* NO MERGE *
Do not merge this PR as long as this label is present.
blocked
The work on this issue is blocked due to some dependency
labels
Jun 10, 2021
- As a final fallback, try to detect services from the DI container before falling back to body behavior.
davidfowl
force-pushed
the
davidfowl/rdf-detect-services
branch
from
June 12, 2021 14:11
01d048c
to
432b02a
Compare
davidfowl
removed
* NO MERGE *
Do not merge this PR as long as this label is present.
blocked
The work on this issue is blocked due to some dependency
labels
Jun 12, 2021
@halter73 feel free to review this on Monday. I'm merging all of the PRs I've had open to get them in the end to end build for further testing. |
This was referenced Jun 13, 2021
amcasey
added
the
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
label
Aug 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api-approved
API was approved in API review, it can be implemented
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RequestDelegateFactory.Create
There are some gotchas:
We can't do this at compile time, it's a runtime only feature (for the future). Not a big deal, we know how to handle this for AOT scenarios in the future.There are side effects. Your object will get created once to "test" if it's indeed a service. We could build an optional capability into the DI container for this to avoid the activation.As part of instantiating the object, we need to dispose it. If this object has a scoped lifetime and isIAsyncDisposable
only, this will currently throw an exception.[FromServices]
attribute and by being explicitIt cleans up this scenario nicely:
This PR is now blocked on dotnet/runtime#53919