title: Register component using both baseclass and interface using Castle.Windsor and conventions
body: <p>I have components in my solution that handles redirects in my system based on different states of the user.
  Those components are base on the abstract type RedirectAction and are doing the job.</p>
  
  <p>I have another interface in the system that is used to monitor if services and functions are working/active. Called IStatusCheck.</p>
  
  <pre><code>        container.Register(
              AllTypes.FromThisAssembly()
                  .BasedOn&lt;IStatusCheck&gt;()
                  .WithServiceBase()
                  .LifestyleTransient());
  
          container.Register(
              AllTypes.FromThisAssembly()
                  .BasedOn&lt;RedirectAction&gt;()
                  .WithServiceBase()
                  .LifestyleTransient());
  </code></pre>
  
  <p>This works well until I let RedirectAction implement IStatusCheck to enable monitoring of them. And I can't figure out how to register in order for the component to be retrieved in both.</p>
  
  <pre><code>ResolveAll&lt;RedirectAction&gt;()
  ResolveAll&lt;IStatusCheck&gt;()
  </code></pre>
  
  <p>Help me please.</p>
  
  <p>EDIT:</p>
  
  <p>More complete example</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          var container = new WindsorContainer();
  
          container.Register(
              AllTypes.FromThisAssembly()
                  .BasedOn&lt;IGenericInterface&gt;()
                  .WithServiceBase()
                  .AllowMultipleMatches());
  
          Debug.Assert(container.ResolveAll&lt;IGenericInterface&gt;().Count() == 2, "Could not find all IGenericInterface types");
  
          container.Register(
              AllTypes.FromThisAssembly()
                  .BasedOn&lt;SpecificAbstractBase&gt;()
                  .WithServices(typeof(SpecificAbstractBase))
                  .AllowMultipleMatches());
  
          var specific = container.ResolveAll&lt;IGenericInterface&gt;().First() as SpecificAbstractBase;
  
          Debug.Assert(specific != null, "Instance was not of expected type");
          Debug.Assert(container.ResolveAll&lt;IGenericInterface&gt;().Count() == 2, "Could not find all IGenericInterface types");
          Debug.Assert(container.ResolveAll&lt;SpecificAbstractBase&gt;().Count() == 2, "Could not find all SpecificAbstractBase types");
      }
  }
  
  public interface IGenericInterface
  {
      bool ImAlive { get; }
  }
  
  public abstract class SpecificAbstractBase : IGenericInterface
  {
      public abstract void DoTheJob();
  
      public bool ImAlive
      {
          get { return true; }
      }
  }
  
  public class SpecificOne : SpecificAbstractBase
  {
      public override void DoTheJob() { }
  }
  
  public class SpecificTwo : SpecificAbstractBase
  {
      public override void DoTheJob() { }
  }
  </code></pre>