I am using Castle Windsor and here is what i want to do.
ParentContainer
has CarFactory
depending on abstract WheelFactory
but WheelFactory
would be registered in child containers 1 and 2
ChildContainer 1
has WheelFactory
as BigWheelFactory
ChildContainer 2
has WheelFactory
as SmallWheelFactory
Now we have [ParentContainer (ChildContainer 1, ChildContainer 2)]
Thread 1 uses only ChildContainer 1
Thread 2 uses only ChildContainer 2
Thread 1 ask for CarFactory
from ChildContainer 1
, car factory should use BigWheelFactory
in this case.
Thread 2 ask for CarFactory
from ChildContainer 2
, car factory should use SmallWheelFactory
in this case.
how can i achieve this with Castle Windsor. Even if means not using child containers