Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Dispose implementations should not be treated as action methods #1294

Closed
rynowak opened this issue Oct 8, 2014 · 5 comments
Closed

Dispose implementations should not be treated as action methods #1294

rynowak opened this issue Oct 8, 2014 · 5 comments

Comments

@rynowak
Copy link
Member

rynowak commented Oct 8, 2014

Currently if you implement IDisposable on a controller class then your Dispose method will be treated as an action unless you attribute it with [NonAction].

The old controller base classes in both MVC and WebAPI were already IDisposable, but the new one is not, so users will end up defining a dispose method if they need it.

We should special case Dispose to treat it as not-an-action by default.

@pranavkm
Copy link
Contributor

pranavkm commented Oct 8, 2014

Would Object methods - ToString, GetHashCode also need to be treated likewise?

@rynowak
Copy link
Member Author

rynowak commented Oct 8, 2014

We already handle object methods specially

@danroth27 danroth27 added this to the 6.0.0-rc1 milestone Oct 8, 2014
@danroth27 danroth27 modified the milestones: 6.0.0-beta2, 6.0.0-rc1 Oct 30, 2014
@danroth27 danroth27 assigned kulmugdha and kanchanm and unassigned kulmugdha Oct 30, 2014
@danroth27
Copy link
Member

We should also add Dispose to Controller.

@kanchanm
Copy link
Contributor

We already have Dispose in the Controller so that is a non-issue. We still need to address the POCO controller case though. Working on the fix that will work for the POCO case too.

@kanchanm
Copy link
Contributor

Commit 4598505

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants