سؤال

I have a C# win form which serves as the GUI for my application. In the form code I've written all the public methods which used by the form events. Now I need to refactor all those public methods to another static class. I've studied 7 methods for refactoring built-in to VS2010 (See here). I also used the Extract interface method but, I still need to implement a interface method before initializing. My question is; Is there any facility in the Visual studio 2010 to do this? Like This

هل كانت مفيدة؟

المحلول

Visual Studio does not support the Extract Class refactoring. The latest versions of ReSharper do.

نصائح أخرى

1 -Static classes can not implement interfaces so rule out this possibility.

2- You can not mock static class.

VS 2010 does not have Extract Class refactoring technique so you need to consider using ReSharper or other refatcoring tools

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top