title: Autofac register and resolve with Names
body: <p>I'm trying to register objects by their names, and later on take them in another type's ctor as parameters, during registration.</p>
  
  <p>Hope my example will be clear enough, here it is:</p>
  
  <pre><code>public class Obj : IObj
  {
      public class Obj(string name)
  }
  
  I register the following objects like this :
  
  
  public void RegisterMyObj(string name)
  {
      // Keyed with the object name
      builder.Register&lt;Obj&gt;().Named&lt;IObj&gt;(name).WithParameter(name).SingleInstance();
  }
  
  public class ObjectsHolder : IObjectsHolder
  {
      public ObjectsHolder (List&lt;IObj&gt; objsToHold))
  }
  
  // I want to register my ObjectsHolder in the following way:
  for example, this is how I want to call it from my code: 
      RegisterObjectsHolder(string Obj1Name, string Obj2Name)
  
  public void RegisterObjectsHolder(params string[] objectsNames)
  {
      builder.Register&lt;IObjectsHolder&gt;().WithParameters(// Here comes the magic code which I can't figure out. 
                                                        // I want objects holder to be registered with the Obj instances whose names were passed to this method, 
                                                        // is there a way to do this?)
                                                        )
  }   
  </code></pre>
  
  <p>I'm not strict about the ways the registrations will look.. If you know of a way to accomplish this using different methods, that will also do.</p>
  
  <p>Thanks in advance!</p>