title: passing parameters to Castle Windsor Typed Factory
body: <p>I am following <a href="http://stw.castleproject.org/Windsor.Typed-Factory-Facility-interface-based-factories.ashx" rel="nofollow noreferrer">this document</a> to use typed factory and pass parameters into constructor.
  The typed factory is giving me this error when I try to pass 2 parameters (1,"fo") as shown in the code.</p>
  
  <p><img src="https://i.stack.imgur.com/Bplln.jpg" alt="enter image description here"></p>
  
  <pre><code>public class SomeClass {
      public ITypedFactory2 F2 { get; set; } 
      public void SomeFunction() {
          var req = F2.Create&lt;IGetFooRequest&gt;(1, "fo"); // ERROR HERE
      }
  }
  public class GetFooRequest : IGetFooRequest {
      public int Bar { get; private set; }
      public string Ton { get; private set; }
      public GetFooRequest(int bar, string ton ) {
          Bar = bar;
          Ton = ton;
      }
  }
  public interface IGetFooRequest{
      int Bar { get; }
      string Ton { get; }
  }    
  public interface ITypedFactory2 {
      T Create&lt;T&gt;(int param1, string param2);
      void Release(object t);
  }
  </code></pre>
  
  <p>and this is the windsor installer part...</p>
  
  <pre><code>container.AddFacility&lt;TypedFactoryFacility&gt;();
  container.Register(Component.For&lt;ITypedFactory2&gt;().AsFactory());
  container.Register(AllTypes
              .FromAssemblyContaining&lt;IGetFooRequest&gt;()
              .Where(type =&gt; type.Name.EndsWith("Request"))
              .WithService.AllInterfaces().LifestyleTransient());
  </code></pre>
  
  <p>Why it says could not resolve non-optional dependency...? I have passed in (1,"fo"); I really don't understand why this is happening... Please help.</p>