title: Passing constructor arguments when using StructureMap
body: <p>I'm using StructureMap for my DI. Imagine I have a class that takes 1 argument like:</p>
  
  <pre><code>public class ProductProvider : IProductProvider
  {
       public ProductProvider(string connectionString)
       { 
           ....
       }
  }
  </code></pre>
  
  <p>I need to specify the "connectionString <strong>at run-time</strong> when I get an instance of IProductProvider.</p>
  
  <p>I have configured StructureMap as follows: </p>
  
  <pre><code>ForRequestedType&lt;IProductProvider&gt;.TheDefault.Is.OfConcreteType&lt;ProductProvider&gt;().  
  WithCtorArgument("connectionString");
  </code></pre>
  
  <p>However, I don't want to call EqualTo("something...") method here as I need some facility to dynamically specify this value at run-time.</p>
  
  <p>My question is: how can I get an instance of IProductProvider by using ObjectFactory? </p>
  
  <p>Currently, I have something like:</p>
  
  <pre><code>ObjectFactory.GetInstance&lt;IProductProvider&gt;();  
  </code></pre>
  
  <p>But as you know, this doesn't work... </p>
  
  <p>Any advice would be greatly appreciated. </p>