Our organization codebase is used by various teams. Over the years, the code has evolved and grown without much usage of interfaces. We would like to change that, to reduce chance of breaking changes.
i.e. change accessing of common components from
Foo foo = new Foo();
Ifoo foo = SomeFactory.GetFoo();
My question is - is there a design pattern \ refactoring pattern \ methodology to introduce interfaces to existing legacy code?
It's worth mentioning that we don't have a 'list' of the most important classes we want to protect by converting their usage to interface. Is there a recommended way to obtain such a list?