title: Autofac - One interface, multiple implementations
body: <p>Single interface: <code>IDoSomething {...}</code></p>
  
  <p>Two classes implement that interface:</p>
  
  <pre><code>ClassA : IDoSomething {...}
  
  ClassB : IDoSomething {...}
  </code></pre>
  
  <p>One class uses any of those classes.</p>
  
  <pre><code>public class DummyClass(IDoSomething doSomething) {...}
  </code></pre>
  
  <p>code without Autofac:</p>
  
  <pre><code>{
  ....
  IDoSomething myProperty;
  
  if (type == "A")
  
      myProperty = new DummyClass (new ClassA());
  
  else
  
      myProperty = new DummyClass (new ClassB());
  
  
  myProperty.CallSomeMethod();
  ....
  }
  </code></pre>
  
  <p>Is it possible to implement something like that using Autofac?</p>
  
  <p>Thanks in advance,</p>