SUGGESTED REFACTORINGS

I have a few suggestions for refactorings. I've been using this product for some time and it is EXCELLENT, but I wanted to get feedback on whether I can easily implemented these suggested refactorings using the OpenAPI, whether they already exist in another form, or whether or not it's feasible to put this on the roadmap.

Extract Interface (w/ Sub interface)

Let's say you have a class like:

class ClassB : ClassA {}

And I want to go about converting everything to interfaces. I go to class A and Extract an interface, so I have:

class ClassA : IClassA

Now, I want to go back to B and Extract an interface. I would expect it to look like:

class ClassB : ClassA, IClassB

.. and the interface should like like:

interface IClassB : IClassA

But that is NOT the case. The only way I can make the interface look like this is if I type this BEFORE I run the Extract Interface refactoring:

class ClassB : ClassA, IClassA

... then it works. Can we make this work without me having to do this?


Refresh Interface
Lots of times you create an interface for a class, and then you go back to that class an add a field and then a property. It'd be nice to be able to Refresh the Interface without having to regerate the whole thing - especially if all you're doing is something simple like making a DateTime property nullable in a class. It's a pain to have to open up the Interface project and change it there, too. (or, it would be really cool if changing the interface changed the class, but that mihgt be hard because not just the public property would have to change, but the underlying field as well)

Better support for Interfaces in different Assemblies
Lots of times you're creating interfaces that live in a different assembly. They may have their own file structure. Is there any way to make the refactoring more friendly to choosing a target project?

I have one other request but don't remember right now... I'll repost.

Thanks in advance,
Andrew

Please sign in to leave a comment.