title: Unity Framework and Multiple Constructors Injection
body: <p>I have a class as a dependency:</p>
  
  <pre><code>public class Foo {
      public Foo() {
          // default constructor
      }
  
      public Foo(IMyInterface my) {
      }
  }
  </code></pre>
  
  <p>When I tried to inject it into another class I got error message as</p>
  
  <blockquote>
    <p>Resolution of the dependency failed ...... InvalidOperationException -
    The current type, IMyInterface, is an interface and cannot be
    constructed. Are you missing a type mapping?</p>
  </blockquote>
  
  <p>I never registered <code>IMyInterface</code> with any concrete type, because I reserve this constructor for other purpose.</p>
  
  <p>With my understanding Unity will try to resolve constructor with least parameters first if not clearily instructing it which one to resolve. So it will try to initialize the default constroctor.</p>
  
  <p>Other than I use <code>InjectionConstructorAttribute</code>, is there a smart way I can tell Unity to ignore the 2nd constructor?</p>