I am familiar with Ninject and in Ninject you can do something similar to
Bind<ICalendar>().To<MonthCalendar>().WhenInjectedInto(typeof(Roster)).InRequestScope();
I'm not sure how to perform something similar in StructureMap. I need to be able to do this dynamically from my own binding without the use of the generic StructureMap methods. Additionally, I need to be able to do it from inside a Registry class. For example...
For(binding.Source).LifecycleIs(GetLifecycle(binding.Scope)).Use(binding.Destination);
I have looked at stack overflow and codebetter for ideas but can not work out how to do conditional binding as in the aforementioned Ninject example.