Skip to content

Improve documentation for ServiceProvider.DisposeAsync.#52131

Merged
cincuranet merged 3 commits intodotnet:mainfrom
cincuranet:dispose-CA-false
Mar 10, 2026
Merged

Improve documentation for ServiceProvider.DisposeAsync.#52131
cincuranet merged 3 commits intodotnet:mainfrom
cincuranet:dispose-CA-false

Conversation

@cincuranet
Copy link
Contributor

@cincuranet cincuranet commented Mar 10, 2026

@cincuranet cincuranet requested review from a team and gewarren as code owners March 10, 2026 09:40
Copilot AI review requested due to automatic review settings March 10, 2026 09:40
@dotnetrepoman dotnetrepoman bot added this to the March 2026 milestone Mar 10, 2026
@cincuranet cincuranet self-assigned this Mar 10, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the DI guidelines documentation to better describe asynchronous disposal behavior when disposing a ServiceProvider, aligning the guidance with IAsyncDisposable usage.

Changes:

  • Clarifies that the container can dispose IAsyncDisposable services via DisposeAsync.
  • Adds a note about ServiceProvider.DisposeAsync using ConfigureAwait(false) semantics during async disposal.

cincuranet and others added 2 commits March 10, 2026 10:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cincuranet cincuranet merged commit 49dcb50 into dotnet:main Mar 10, 2026
9 checks passed
@cincuranet cincuranet deleted the dispose-CA-false branch March 10, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants