title: Unity constructor parameters, with a twist
body: <p>I have this type of class hierarchy:</p>
  
  <pre><code>public interface IA{}
  
  public interface IB{void Foo();}
  
  public class A:IA
  {
   [Dependency]
   IB myb{get;set;}
  
   void myfunc(){ myb.Foo()}
  }
  
  public class B:IB
  {
   public B(IA ia){}
  }
  </code></pre>
  
  <p>I want to make an instance of class A with Unity. 
  But when I want to make it I would want to write something like this:</p>
  
  <pre><code>public Testclass
  {   
   void TestMethod()
   {
    IUnityContainer container = new UnityContainer();
    A currentA;
    container.RegisterType&lt;IB,B&gt;(new InjectionConstructor(currentA);
    currentA = container.Resolve&lt;A&gt;(); 
   }
  }
  </code></pre>
  
  <p>This fails at the container.RegisterType line, saying that "Parameter type inference does not work for null values."</p>
  
  <p>How to make this work?</p>
  
  <p>Edit: Ahhhh how I hate this... Our Architect made two interfaces with the same name, and that's why I wasted 2 hours of my life. Daniel Hilgarth gave me a good idea, but I couldn't use it until I realised that resharper imported the wrong interface.</p>