Here's a link to a discussion from 2008 about the very same problem for some more background: http://groups.google.com/group/castle-project-users/browse_thread/thread/2b5728dbcea5081a/deea0d2e795ff8f7?hl=en&lnk=gst&q=unwanted+constructor#deea0d2e795ff8f7 That's from time before we supported components exposing multiple types. That's not the case anymore.
On Mar 2, 10:23 pm, Krzysztof Koźmic <[email protected]> wrote: > Hi folks. > > First some background: > > container.ResolveAll<IFoo>(); > > if you call this method in current version of Windsor (and v2.1 and 2.0 > and RC3 too I think) it will resolve all components where implementation > type implements IFoo. That's not what most people would expect, which is > - to return only components that were registered to expose IFoo as their > service. > > in other words: > > container.ResolveAll<object>() will resolve each and every component > from the container. > > Now, that's not usually a big deal and I guess some people even depend > on this behaviour. However it breaks horribly in ASP.NET MVC where > Controller class implements all four kinds of filter interfaces and it's > a mess if you want to nicely pull filters from the container. > > It also is not the default that most people would expect so: > > *I want to change that behaviour in vNext so that it returns only > components exposing IFoo as a service.* > > Notice that you will be able to make it behave like it does now with a > custom IHandlersFilter (added few weeks back) which will have additional > benefit of being more fine grained so it doesn't have to be an > all-or-nothing thing. > > Any insights/objections? > > Krzysztof -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
