I\'m having difficulty conditionally creating a dependency. Googling, I have yet to find a good example of using the BuildStack and Conditional Predicates.
Here\'s
It's often best to try to avoid conditional construction with that syntax, it is much harder to interpret than the For - Use. Your scenario can be solved using:
For<IDoStuffWithFooA>().Use<DoStuffWithFooA>().Ctor<IFoo>().Is<FooA>();
For<IDoStuffWithFooB>().Use<DoStuffWithFooB>().Ctor<IFoo>().Is<FooB>();
For<IFoo>().Use<FooZ>();
Scan(
s =>
{
s.TheCallingAssembly();
s.WithDefaultConventions();
});