title: Simple Injector register multiple type of same interface with metadata
body: <p>I have the following problem. I have one interface say <code>IFoo</code> and multiple implementations from it. Now, I have one web API controller, which according to some circumstances, should create a particular type of <code>IFoo</code> descendant, call it's method(s) and return result. The logic of the controller doesn't change no matter which implementation of <code>IFoo</code> I use. For this task, I need to tell the container which <code>IFoo</code> implementation to create from the controller, the problem is that, I don't know how to do that (if it's even possible with Simple Injector). </p>
  
  <p>P.S. I already thought about <code>RegisterAll</code>, but in this case I'm forced to create all <code>IFoo</code> descendants (and pass it to the controller) when I need only one. This is not a solution for me.</p>
  
  <p>Another solution would be to create different controllers for different <code>IFoo</code> implementations and use context based injection, but this will result in duplicated code/controllers that I want to avoid. </p>
  
  <p>Ideally, the solution should be something like</p>
  
  <pre><code>container.RegisterAllWithMetadata(IEnumerable&lt;Type&gt; types, IEnumerable&lt;string&gt; metadata)
  container.GetInstance(Type type, string metadata)
  </code></pre>
  
  <p>Is it possible to achieve my goal with Simple Injector?</p>