title: How to configure ObjectFactory to call parameterized constructor structuremap
body: <p><strong>PLEASE: If my question isn't clear, please tell me and I'll try to rephrase it</strong></p>
  
  <ol>
  <li>I need [Default Constructor] in LogOnModel, so it <strong>can't</strong> be removed.</li>
  <li>LoadModel+ModelFactory and LogOnModel are physically in different files in different projects AND project2 has reference to project1 and NOT vice versa.</li>
  </ol>
  
  <p>1 - Let say that
      <strong>type=typeof(LogOnModel)</strong>. When <strong>ObjectFactory.GetInstance(t)</strong> is called I want it to call the
      <strong>parameterized</strong> constructor of LogOnModel and pass it the @params</p>
  
  <p>2 - If I'll add to the <strong>parameterized</strong> constructor of LogOnModel another parameter,for example </p>
  
  <pre><code>public LogOnModel(string param, IPageService pageService)
  </code></pre>
  
  <p>so ObjectFacytory should call this constructor without any problems</p>
  
  <p>How to configure/initiate ObjectFactory, so this will work?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDITED</strong></p>
  
  <pre><code>//Project1/file1.cs    
  public void LoadModel(Type type, string param)  
  {
       var factory = new ModelFactory();
       var model = factory.Get(type, **param**);
  }
  public class ModelFactory : IModelFactory
  {
       public PageModel Get(Type t, **string param**)
       {            
           //NOW I NEED SOMEHOW TO PASS **param** TO EVERY INSTANCE THAT INHERITS FROM **PageModel**
           return ObjectFactory.GetInstance(t) as PageModel;
       }
  }
  //Project2/file2.cs
  public class LogOnModel : PageModel
  {        
       public LogOnModel()
       {
       }
       public LogOnModel(string param)
       {                        
       }              
  }
  public class Model2 : PageModel
  {        
       public LogOnModel()
       {
       }
       public LogOnModel(string param)
       {                        
       }              
  }
  public class Model3 : PageModel
  {        
       public LogOnModel()
       {
       }
       public LogOnModel(string param)
       {                        
       }              
  }
  </code></pre>