title: StructureMap automatically register descendant classes
body: <p>I have a base class of Repository&lt;T&gt;.  In a particular project I have several implemetations of this base class.  e.g. </p>
  
  <pre><code>PersonRepository : Repository&lt;T&gt;
  EmployerRepository : Repository&lt;T&gt;
  </code></pre>
  
  <p>Right now, I am register each of these repositories in a StructureMap ServiceRegistry class. like this:</p>
  
  <pre><code>ForRequestedType&lt;Repository&lt;Person&gt;&gt;()
    .TheDefaultIsConcreteType&lt;PersonRepository&gt;();
  ForRequestedType&lt;Repository&lt;Employer&gt;&gt;()
    .TheDefaultIsConcreteType&lt;EmployerRepository&gt;();
  </code></pre>
  
  <p>This sucks, because every time I add a repository, I have to remember to register it.  It's one more step.</p>
  
  <p>Is there a way that I could search the project/assembly where PersonRepository is located and register everything that inherits from Repository&lt;T>?</p>