Resharper (or Visual Studio) shortcut to cascade changes to a constructor -


here common refactoring don't believe have seen shortcut for:

imagine have base class number of inheriting subclasses. base classes uses constructor injection accept number of services:

class foobase {     private imyservice _myservice;     private imyotherservice _myotherservice;      public foobase(imyservice myservice, imyotherservice _myotherservice)     {          _myservice = myservice;          _myotherservice = myotherservice;     } }  class fooconcrete : foobase {     public fooconcrete(imyservice myservice, imyotherservice _myotherservice)         base(myservice, myotherservice)     {     } } 

notice how fooconcrete has call constructor of base class, foobase.

now, happens if want add service foobase? can initialize new private field foobase's constructor. still have go around , manually update every subclass inherits foobase. can hassle if there lots of inheriting classes.

is there shortcut, or perhaps trick can use, update subclasses' constructors well?

build, fix compilation errors.

resharper has no tool this, including afaik in resharper 6, got launched today.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -