title: Castle Windsor: how to register multiple types as implementing a specific interface?
body: <p><strong>UPDATED</strong></p>
  
  <p>I have the following classes / interfaces:</p>
  
  <pre><code>public interface IFoo
  {
      (...)
  }
  
  public interface IFoo&lt;T&gt; : IFoo
  {
      (...)
  }
  
  public abstract BaseFoo&lt;T&gt; : IFoo&lt;T&gt;
  {
      (...)
  }
  
  public Bar : BaseFoo&lt;ConcreteType1&gt;
  {
      (...)
  }
  
  public Baz : BaseFoo&lt;ConcreteType2&gt;
  {
      (...)
  }
  </code></pre>
  
  <p>Using Castle Windsor, how can I register the types Bar and Baz as implementing IFoo?</p>
  
  <p>I already tried unsuccessfully something like:</p>
  
  <pre><code>Register(Types.FromAssembly(typeof (IFoo).Assembly)
          .BasedOn&lt;IFoo&gt;()
          .WithService
          .Select(new List&lt;Type&gt; { typeof(IFoo)})
          .Configure(x =&gt; x.LifeStyle.Is(LifestyleType.Singleton)));
  </code></pre>