I need to be able to work with DI Container as a "context". That means, in different contexts the same interface should be resolved with different implementations.
Practically, on resolve one container should look for implementations in one set of assamblies, the other container in an other set.
As this should not be totally dynamic, it could be easily configured per container in the configuration file, which can be loaded by name. There would be multiple implementations of the same interface registered with name in the container, so I could do ResolveAll().
Unfortunatelly, the schema of the unity configuration tells me that the element is bound to the whole Unity "runtime" and not to one or the other container.
Is there any other way to achieve this with Unity? Or can anyone suggest an other IoC framework that can do this?
PS1: I know that it sounds a little bit like plugin architecture, but it is not, and I need the power of DI.
PS2: I could try to reference all assamblies on unity level, and narrow the search on container level using just namespaces and type names, but I can not guarantee that those names will remain unique. The only certain thing is the assambly.
Thank you