I have two containers, a WindsorContainer and a generic IServiceProvider. I want to chain them together such that WindorContainer.Resolve automatically falls back to the IServiceProvider.GetService if it can't find what it's looking for, including chained dependencies. Any suggestions on how to wire this up?
Example: WindsorContainer: - IFoo - new Foo(A, B) - A IServiceProvider - B Result: WindsorContainer.Resolve<IFoo>() returns a new Foo with A from the Windsor container and B from the IServiceProvider. If my second container were also a WindsorContainer I think I would just wire up WindsorContainer.Kernel.Parent, but how can this be accomplished with a dissimilar container? So far I have tried ILazyComponentLoader (permanently registers the result), ISubDependencyResolver (invoked from Register, not Resolve), and setting Parent with an IKernel wrapping IServiceProvider (way too complicated, I got lost several interfaced down). Maybe there's an event I'm missing for handling failed resolutions? Or am I just mad for trying? -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/castle-project-users. For more options, visit https://groups.google.com/d/optout.
