Skip to content

Support IAsyncDisposable in MVC #13150

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

Closed
Tracked by #27883
rynowak opened this issue Aug 14, 2019 · 1 comment · Fixed by #29313
Closed
Tracked by #27883

Support IAsyncDisposable in MVC #13150

rynowak opened this issue Aug 14, 2019 · 1 comment · Fixed by #29313
Assignees
Labels
affected-medium This issue impacts approximately half of our customers area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-blocking This label is used by an internal tool
Milestone

Comments

@rynowak
Copy link
Member

rynowak commented Aug 14, 2019

We should add support for IAsyncDisposable in MVC.

This includes everything that we create for you (IE: not created by DI). Generally these things already follow the activator service pattern, and we already support calling Dispose for you if you implement IDisposable.

  • Controllers
  • Page Models
  • View Components

As an exception to this, we don't currently call Dispose on tag helpers.

  • Tag Helpers
@rynowak rynowak added enhancement This issue represents an ask for new feature or an enhancement to an existing one area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels Aug 14, 2019
@mkArtakMSFT mkArtakMSFT added this to the 5.0.0 milestone Aug 15, 2019
@ghost
Copy link

ghost commented Jul 21, 2020

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@pranavkm pranavkm added affected-medium This issue impacts approximately half of our customers severity-blocking This label is used by an internal tool and removed cost: M labels Nov 6, 2020
@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, 6.0-preview1 Dec 3, 2020
javiercn added a commit that referenced this issue Jan 19, 2021
#29313)

[Mvc] Support IAsyncDisposable in controllers, pages and view components

* Adds async versions of Release to the relevant interfaces in different
  factories and activators.
* The new methods offer a default interface implementation that will
  delegate to the syncrhonous version and just call dispose.
* Our implementations will override the default implementation and handle
  disposing IAsyncDisposable implementations.
* Our implementations will favor IAsyncDisposable over IDisposable when
  both interfaces are implemented.
* Extenders will have to override the new methods included to support
  IAsyncDisposable instances.
@javiercn javiercn self-assigned this Jan 19, 2021
@mkArtakMSFT mkArtakMSFT added the Done This issue has been fixed label Jan 26, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-medium This issue impacts approximately half of our customers area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-blocking This label is used by an internal tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants