Skip to content

Add the ConfigurationManager to the IServiceCollection (#36832) #36864

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

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Sep 22, 2021

  • Add an IConfiguration to the service collection for scenarios where uses end up prematurely building the service provider or sniffing the IServiceCollection for it. We then remove the ConfigurationManager reference it from the final IServiceCollection to avoid cycles in the configuration graph that result in stack overflows (we link the configuration manager to the final configuration that has been built).
  • Added tests

Backport of ce73350

- Add an IConfiguration to the service collection for scenarios where uses end up prematurely building the service provider or sniffing the IServiceCollection for it. We then remove the ConfigurationManager reference it from the final IServiceCollection to avoid cycles in the configuration graph that result in stack overflows (we link the configuration manager to the final configuration that has been built).
- Added tests
@ghost ghost added the area-runtime label Sep 22, 2021
@davidfowl davidfowl enabled auto-merge (squash) September 23, 2021 00:34
@davidfowl davidfowl merged commit 87894e2 into main Sep 23, 2021
@davidfowl davidfowl deleted the davidfowl/backport branch September 23, 2021 17:10
@ghost ghost added this to the 7.0-preview1 milestone Sep 23, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants