Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating an interface from a huge class using resharper

I have a very big class with lots of methods, is it possible to build an interface from this class using Resharper?

like image 881
mrblah Avatar asked Aug 12 '09 20:08

mrblah


2 Answers

Yes.

My shortcut is Ctrl + Shift + R to bring up the refactoring options. Doing this on the class name allows you to" Extract Interface..."

Optionally, you can choose from the menu > ReSharper > Refactor > Extract Interface...

like image 165
Chris Missal Avatar answered Oct 16 '22 02:10

Chris Missal


Uh, maybe I'm missing something here (I've never used resharper) but you can extract an interface from a class using the standard VS IDE refactoring tools (at least you can in 2008). Right click the class, select 'Refactor' and then 'Extract Interface'. This will bring up a dialog box where you can select which properties to include.

like image 43
Paul Avatar answered Oct 16 '22 01:10

Paul