[x] I have verified that I am running the latest version of DisposableFixer
[x] I have searched open and closed issues to ensure it has not already been reported
There was similar request in issue #20, that got the label wontfix.
Description
In some situations it is impractical to enforce to dispose all fields and properties in Dispose-method. For instance in Unit Test there is often a special way for tearing down your tests. E.g. in Spec Test, the cleanup tasks are done within a method named Cleanup. In NUnit 2 Tests there is a method with an attribute called TearDownAttribute.
In fact it does not hurt, when these fields and properties get disposed in Dispose method, too, But it is extra work only to tell the extension, that everything is ok.
My proposal is, to allow dispose of fields and properties in more than the Dispose method. It also can be restricted to certain user-defined method in used-defined class. E.g.: Cleanup in classes that derive from Spec. Method with attribute called Teardown
Prerequisites
Description
In some situations it is impractical to enforce to dispose all fields and properties in Dispose-method. For instance in Unit Test there is often a special way for tearing down your tests. E.g. in Spec Test, the cleanup tasks are done within a method named Cleanup. In NUnit 2 Tests there is a method with an attribute called TearDownAttribute.
In fact it does not hurt, when these fields and properties get disposed in Dispose method, too, But it is extra work only to tell the extension, that everything is ok.
My proposal is, to allow dispose of fields and properties in more than the Dispose method. It also can be restricted to certain user-defined method in used-defined class. E.g.: Cleanup in classes that derive from Spec. Method with attribute called Teardown
Source Code
Screenshot