title: Castle Windsor - Registering multiple interfaces with same generic factory method
body: <p>I'm using Castle Windsor to register a number of interfaces each of which can created with a generic factory method. i.e.</p>
  
  <pre><code>container.Register(Component.For(typeof(IFirstService))
      .UsingFactoryMethod(k =&gt; GetService&lt;IFirstService&gt;())
      .LifeStyle.Singleton);
  
  container.Register(Component.For(typeof(ISecondService))
      .UsingFactoryMethod(k =&gt; GetService&lt;ISecondService&gt;())
      .LifeStyle.Singleton);
  </code></pre>
  
  <p>Rather than add registration code for each interface, can I use the <code>Types</code> method to register them all in one go (all interfaces derive from <code>IService</code>) eg:</p>
  
  <pre><code>container.Register(Types
      .FromThisAssembly()
      .Where(t =&gt; typeof(IService).IsAssignableFrom(t))
      .Configure(c =&gt; c.UsingFactoryMethod(k =&gt; GetService&lt;?&gt;()));
  </code></pre>