title: Passing parameters to UsingFactoryMethod in Castle Windsor
body: <p>How do I pass dynamic parameters to a <code>UsingFactoryMethod</code> registration?</p>
  
  <p>For example, I want to write something like:</p>
  
  <pre><code>container.Register(
     Component.For&lt;IFoo&gt;()
          .UsingFactoryMethod(return DoSomethingAndReturnInstance(paremeter)));
  </code></pre>
  
  <p>I need the parameters to be sent at runtime, like this:</p>
  
  <pre><code>container.Resolve&lt;IFoo&gt;(new { parameter = value });
  </code></pre>
  
  <p>How can it be done?</p>