title: Getting unity to resolve multiple instances of the same type
body: <p>I want to do a simple resolve of multiple type registrations (ultimately constructor injected, but using .Resolve to see if Unity is even capable of such things.</p>
  
  <p>In every case below, Unity resolves 0 items where it should be resolving 2.</p>
  
  <p>Is there some switch in unity that turns on post-2007 behavior?  Or am I just drastically missing something?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public interface IFoo {}
  public class Foo1 : IFoo{}
  public class Foo2 : IFoo{}
  
  class Program
  {
      static void Main(string[] args)
      {
          var container = new UnityContainer();
          container.RegisterType&lt;IFoo, Foo1&gt;();
          container.RegisterType&lt;IFoo, Foo2&gt;();
  
          // container.Resolve&lt;IEnumerable&lt;IFoo&gt;&gt;();   returns 0
          // container.ResolveAll&lt;IFoo&gt;(); returns 0
  
          var foos = container.Resolve&lt;IFoo[]&gt;();
          Console.WriteLine(foos.Count());
  
          Console.ReadLine();
  
      }
  }
  </code></pre>