Skip to content
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

Update ScopedBackgroundService #38880

Merged
merged 2 commits into from
Dec 29, 2023
Merged

Update ScopedBackgroundService #38880

merged 2 commits into from
Dec 29, 2023

Conversation

Varorbc
Copy link
Contributor

@Varorbc Varorbc commented Dec 27, 2023

Summary

The IServiceScopeFactory is always registered as a singleton, but the IServiceProvider can vary based on the lifetime of the containing class.

https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection#scope-scenarios


Internal previews

📄 File 🔗 Preview link
docs/core/extensions/scoped-service.md Use scoped services within a BackgroundService

@dotnet-bot dotnet-bot added this to the December 2023 milestone Dec 27, 2023
@ghost ghost added the community-contribution Indicates PR is created by someone from the .NET community. label Dec 27, 2023
@IEvangelist IEvangelist merged commit 76decd9 into dotnet:main Dec 29, 2023
8 checks passed
@Varorbc Varorbc deleted the patch-1 branch December 29, 2023 23:32
IEvangelist pushed a commit that referenced this pull request Dec 30, 2023
* Fix typography at sample code in fsharp snippets (#38913)

* Extract remarks for System.Globalization* (#38912)

* fix build suggestions (#38917)

* Remove snap reference from include file (#38902)

* clarify linux portions of http3/libmsquic (#38901)

* Add note about linux and IPC (#38849)

* Update package index with latest published versions (#38920)

* Update ScopedBackgroundService (#38880)

* Update ScopedBackgroundService.cs

* Update scoped-service.md

* Make it clear you can install multiple versions (#38919)

* Make it clear you can install multiple versions

* more clarifications

* fix link

* clarify greps (#38921)

* Add clarifications around Arm packages and Ubuntu (#38922)

* Clarify Arm

* Clarify Arm

---------

Co-authored-by: Takamasa Matsui <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Andy (Steve) De George <[email protected]>
Co-authored-by: Azure SDK Bot <[email protected]>
Co-authored-by: Varorbc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants