title: Wire up StructureMap with generic open type arguments
body: <p>How would I wire up StructureMap with the following:</p>
  
  <pre><code>public Interface IRepository&lt;T, TIdentity&gt;{}
  public abstract class Repository&lt;T, TIdentity&gt; : IRepository&lt;T, TIdentity&gt;, other interfaces
  </code></pre>
  
  <p>I have many concrete implementations of Repository and need StructureMap to wire them up automatically.</p>
  
  <pre><code>public class JournalRepository : Repository&lt;Journal,int&gt;{}
  public class UsersRepository : Repository&lt;Users,int&gt;{}
  public class AccountGroupsRepository : Repository&lt;Accounts,string&gt;{}
  </code></pre>
  
  <p>etc.</p>
  
  <p>I've tried:</p>
  
  <pre><code> x.ForRequestedType(typeof(IRepository&lt;,&gt;))
  .TheDefaultIsConcreteType(typeof(Repository&lt;,&gt;));
  </code></pre>
  
  <p>but I just get StructureMap Exception Code:  25 (with no explanation).</p>
  
  <p>Is this at all possible?</p>
  
  <p>Many thanks
  Jeremy</p>