title: How to register same class twice with different dependencies
body: <p>I would like to configure Castle Windsor to create two components of same type (Foo -> IFoo), but with different constructor inputs. I would also later like to consume both components when creating another component (type Bar - see code below).</p>
  
  <pre><code>public interface IFoo { }
  
  public class Foo : IFoo
  {
      private string _prop;
  
      public Foo(string prop)
      {
          _prop = prop;            
      }
  }
  
  public class Bar
  {
      private IFoo _fooAbc;
      private IFoo _foo123;
  
      public Bar(IFoo fooAbc, IFoo foo123)
      {
          _foo123 = foo123;
          _fooAbc = fooAbc;
      }
  }
  </code></pre>
  
  <p>In component installer I tried registering components like this:</p>
  
  <pre><code>public void Install(IWindsorContainer container, IConfigurationStore store)
      {
          container.Register(Classes.FromThisAssembly()
                              .BasedOn&lt;IFoo&gt;().WithServiceBase()
                              .ConfigureFor&lt;Foo&gt;(c =&gt; c.DependsOn(Dependency.OnValue&lt;string&gt;("abc")).Named("fooAbc"))
                              .ConfigureFor&lt;Foo&gt;(c =&gt; c.DependsOn(Dependency.OnValue&lt;string&gt;("123")).Named("foo123")));
  
          container.Register(Component.For&lt;Bar&gt;());   //?? specify which service to use
      }
  </code></pre>
  
  <p>But castle throws an registration exception. So how can I configure two instances of Foo, one with "abc" and another with "123" dependency? Also I would later like to correctly assign them when constructing Bar, so that fooAbc is used as first constructor input, and foo123 as second. My end goal would be to successfully resolve Bar.</p>