1

Possible Duplicate:
Windsor Container: How to specify a public property should not be filled by the container?

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.

Community
  • 1
  • 1
Nathan
  • 1,591
  • 4
  • 17
  • 22

0 Answers0