title: How to configure Unity to inject an array for IEnumerable
body: <p>I have a class which takes an <code>IEnumerable</code> constructor parameter which I want to resolve with Unity and inject an array of objects.  These simple classes illustrate the problem.</p>
  
  <pre><code>public interface IThing
  {
      int Value { get; }
  }
  
  public class SimpleThing : IThing
  {
      public SimpleThing()
      {
          this.Value = 1;
      }
  
      public int Value { get; private set; }
  }
  
  public class CompositeThing : IThing
  {
      public CompositeThing(IEnumerable&lt;IThing&gt; otherThings)
      {
          this.Value = otherThings.Count();
      }
  
      public int Value { get; private set; }
  }
  </code></pre>
  
  <p>Say I want to inject four <code>SimpleThing</code> in to <code>CompositeThing</code>.  I've tried several variations on the following Unity configuration.</p>
  
  <p></p>
  
  <pre><code>&lt;alias alias="IThing" type="TestConsoleApplication.IThing, TestConsoleApplication" /&gt;
  &lt;alias alias="SimpleThing" type="TestConsoleApplication.SimpleThing, TestConsoleApplication" /&gt;
  &lt;alias alias="CompositeThing" type="TestConsoleApplication.CompositeThing, TestConsoleApplication" /&gt;
  
  &lt;container&gt;
  
    &lt;register type="IThing" mapTo="SimpleThing" name="SimpleThing" /&gt;
    &lt;register type="IThing" mapTo="CompositeThing" name="CompositeThing"&gt;
      &lt;constructor&gt;
        &lt;param name="otherThings"&gt;
          &lt;array&gt;
            &lt;dependency type="SimpleThing"/&gt;
            &lt;dependency type="SimpleThing"/&gt;
            &lt;dependency type="SimpleThing"/&gt;
            &lt;dependency type="SimpleThing"/&gt;
          &lt;/array&gt;
        &lt;/param&gt;
      &lt;/constructor&gt;
    &lt;/register&gt;
  
  &lt;/container&gt;
  </code></pre>
  
  <p></p>
  
  <p>However I get the error message <strong>The configuration is set to inject an array, but the type IEnumerable`1 is not an array type.</strong>  If I change the constructor parameter to be <code>IThing[]</code> it works, but I don't want to do that.  What do I need to do to my Unity configuration to get this to work?</p>