title: C# Unity register a list of registered types and resolve by adding N instances
body: <p>I have a service that receives a </p>
  
  <pre><code> public ServiceManagement(List&lt;IWorker&gt; workers)
  </code></pre>
  
  <p>And I have the workers registered:</p>
  
  <pre><code>this.Container.RegisterType&lt;IWorker, Worker&gt;
  </code></pre>
  
  <p>I would like to tell unity when resolving that list to create exactly N instances of Worker.</p>
  
  <p>Anyone can help?</p>
  
  <p>I tried the following:</p>
  
  <p>Receiving an array instead of a List and registering like so:</p>
  
  <pre><code>for (int i = 0; i &lt; N; i++)
  {
      this.Container.RegisterType&lt;IWorker, Worker&gt;(i.ToString());
  }
  </code></pre>
  
  <p>But this only works for different implementations of IWorker not the same.</p>
  
  <p>Thanks in advance!</p>