title: Instance of Container used in Funq
body: <p>I am waching the screencast of Funq but I don't understand something with the following lambda in the testing code :</p>
  
  <pre><code>var container = new Container();
  container.Register&lt;IBar&gt;(c =&gt; new Bar());
  </code></pre>
  
  <p>the declaration :</p>
  
  <pre><code>public void Register&lt;TService&gt;(Func&lt;Container, TService&gt; factory) { ... }
  </code></pre>
  
  <p>In the lambda, the <strong>new Bar()</strong> acts as the <strong>TService</strong> and the <strong>c</strong> as the <strong>Container</strong> for the Func used in Register method.</p>
  
  <p>During the execution, when is this c delcared ? Is it the <strong>container</strong> created at the beginning because I do not understand when an instance of a Container is passed to the <strong>Register</strong> method.</p>