Windsor Setter Injection in code
问题 I'm using Windsor to do IoC in our .Net project, but I'm having difficulties doing setter injection in code. I believe it comes from the fact that I blanket register my components, since eventually I'm hoping that legacy project will be fully IoC compliant and mostly Unit Tested (sweet dreams!). Here is how I'm registering the DAOs: container .Register(AllTypes.FromAssemblyNamed("MyApp.Business") .Where(Component.IsInNamespace("MyApp.Business.Dao")) .WithService.DefaultInterface()); And here