title: Introducing an IoC Container to Legacy Code
body: <p>I'm writing a new .NET library for internal use at my company that will use IoC through Dependency Injection.  Naturally, this library will be much easier to use if we use an IoC Container to resolve instances.</p>
  
  <p>However, the code that will be making calls into this library does NOT currently use Dependency Injection of any sort, and refactoring the legacy code to use DI is out of scope for my project.  So, what's the best way to start using a Container in this legacy code to get instances from my new library?</p>
  
  <p>If possible, I'd like to keep from littering said legacy code with hard references to whichever IoC container I choose.  Since I'm relatively new to DI, it's somewhat likely that we'll change our mind on which Container we want to use at some point.</p>
  
  <p>If I wrap my container in something like the <a href="http://www.codeplex.com/CommonServiceLocator" rel="noreferrer">CommonServiceLocator</a> library on CodePlex, would that be a reasonable approach?</p>
  
  <p>What have other folks done?</p>