title: How to register generic with two types in Simple Injector?
body: <p>Here is my Interface and class : </p>
  
  <pre><code> public interface IServiceFactory&lt;T, Y&gt; where T : class  where Y : class
  {
       T Create(ModelStateDictionary modelState);
  }
  
  public class ServiceFactory&lt;T, Y&gt; : IServiceFactory&lt;T, Y&gt;
      where T : class
      where Y : class
  {
  
      public T Create(ModelStateDictionary modelState)
      {
          var x = (T) Activator.CreateInstance(typeof (Y), new ModelStateWrapper(modelState));
          return x;
      }
  }
  </code></pre>
  
  <p>container register of Simple Injector:</p>
  
  <pre><code>  container.RegisterManyForOpenGeneric(typeof(IServiceFactory&lt;, &gt;), typeof(IServiceFactory&lt;, &gt;));
  </code></pre>
  
  <p>How to set up Simple Injector to work with generics which contain more than one type? </p>