title: Castle Windsor Registration of Interface and Abstract Implementations
body: <p>I am trying to work out how to auto register implementations of an generic abstract class or interface. Here are my classes:</p>
  
  <pre><code>public abstract class AbstractValidator&lt;T&gt; : IValidator&lt;T&gt;
  {
     public void Validate(T)
     {
        ...
     }
  }
  
  public class CustomerValidator:AbstractValidator&lt;Customer&gt;
  {
    ...
  }
  </code></pre>
  
  <p>I am trying the following:</p>
  
  <pre><code>_container = new WindsorContainer();
  _container.Register(
      AllTypes.FromAssemblyContaining&lt;ValidationPatterns&gt;()
           .BasedOn&lt;IValidator&gt;()
           .WithService.Base()
      }));
  
  IValidator&lt;Customer&gt; val = _container.Resolve&lt;IValidator&lt;Customer&gt;&gt;();
  </code></pre>
  
  <p>Any tips greatly appreciated.</p>
  
  <p>Cheers</p>