views:

83

answers:

1

I am attempting to use the WindsorContainer, but I need to turn off Property Injection for the entire container. Here's the code I was trying, but it doesn't seem to have an effect.

this.Container = new WindsorContainer(new XmlInterpreter(new ConfigResource("Dependencies")));
this.Container.Kernel.ComponentModelBuilder.RemoveContributor(
  this.Container.Kernel.ComponentModelBuilder.Contributors.OfType<Castle.MicroKernel.ModelBuilder.Inspectors.PropertiesDependenciesModelInspector>().Single()
);

I'd rather not use the Attribute [DoNotWire] on my properties because I don't want my application to have to know it's running with Windsor.

Any help would be greatly appreciated.