title: Ninject passing in constructor values
body: <p>With Ninject, how do you configure the kernel so I can define what constructor values are passing into the instantiation of an object?</p>
  
  <p>I have the following configured in a module:</p>
  
  <pre><code>Bind&lt;IService1&gt;()
      .To&lt;Service1Impl&gt;()
      .InSingletonScope()
      .Named("LIVE");
  Bind&lt;IService2&gt;()
      .To&lt;Service2Impl&gt;()
      .InSingletonScope()
      .Named("LIVE")
      .WithConstructorArgument(
          "service1", 
          Kernel.Get&lt;IService1&gt;("LIVE"));
  </code></pre>
  
  <p>Service2Impl takes a constructor parameter of IService1 but I want this to come from the container. I also want to have named bindings as my code will be targeting different versions at runtime.</p>
  
  <p>This seems to work but is it the right way to achieve what I want to do?
  Should I be achieving without the use of named bindings and wiring different configuration modules into the kernel?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have used the ToMethod() method now to specify a delegate to call on request of a specific type. This seems a bit nicer as I'll get compile time warnings if the constructor configuration is wrong rather than having to know the name of the parameter I am passing first.</p>
  
  <p>Thanks</p>