The best containers for IOC will support this use.
I am not familiar with Windsor; my choice for IOC is StructureMap. In the free StructureMap interface, you have many options for adjusting the input parameters of objects in runtime, depending on what you can express in the code. I am sure that Windsor offers the same.
The only thing Iβm talking about using IOC is that someday it will really make it difficult to understand the solution.
In your example, if you really have the right use case for a strategy template in which you would implement this behavior, even if you would not use IOC as an input strategy object (using some Factory approach), then I would say yes continue the implementation of the IOC.
But if you really don't need to introduce an abstraction of the whole object to express the logic of whether certain users receive emails, this might be the case for templates for templates.
source share