title: Windsor Dependency injection with properties
body: <p>I have a windsor container and windsor doesnt inject my property. The curious thing is with <code>ServiceA</code> the dependency is resolved but not with the component.</p>
  
  <pre><code>Container.AddFacility&lt;WcfFacility&gt;();
  Container.Register(Component.For&lt;PublisherService&gt;().AsWcfService());
  Container.Register(Component.For&lt;IExecutionProgram&gt;().ImplementedBy&lt;ExecutionProgram&gt;());
  Container.Register(Component.For&lt;IValidationProgram&gt;().Instance(Factory.CreateProgramA()));
  Container.Register(Component.For&lt;RunnerService&gt;().AsWcfService());
  </code></pre>
  
  <p>This is my <code>Factory</code> (All the Dependencies implement the same interface and all SubDependencies implement an other shared Interface):</p>
  
  <pre><code>public static class Factory{
    public static IValidationProgram CreateProgramA(){
      var program = new ValidationProgram(
         new DependencyA(
           new SubDependencyA(),
           new SubDependencyB(),
         ),
         new DependencyB()
      );
    }
  }
  </code></pre>
  
  <p>In my <code>RunnerService</code> the <code>IExecutionProgram</code>, Property will be resolved.
  In my <code>IValidationProgram</code>, I created the <code>IExecutionProgram</code> will not be resolved.
  Properties are public in both Implementations.
  What did I do wrong?</p>
  
  <p><strong>EDIT:</strong>
  I added the factory. These Dependencies are all Interfaces and I need specific implementations for a program. So in general I would like to switch easily between programA or programB. I looked into type Facilities like  Marwijn supposed, but I cant get the hang of it. How do I use it in my case?</p>