I'm not happy with the idea of changing that behaviour. And workarounds like custom IHandlerSelector etc. bring in some new complexity wich is not necessary from my point of view. Why not simply make a method like ResolveAllExplicit<IFoo> or something like that and leave
the current ResolveAll like it is?

Am schrieb Krzysztof Koźmic <[email protected]>:
can't say from this code. Do they depend on this behaviour? Anyway - like I said it will be possible to do a fallback to the old behavior easily so if they need to, they can.





On 04/03/2011 7:12 AM, John Simons wrote:


I wonder if this change breaks NServiceBus integration!

https://github.com/NServiceBus/NServiceBus/blob/master/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/WindsorObjectBuilder%20.cs



On Mar 2, 11:23 pm, Krzysztof Koź[email protected]>

wrote:


Hi folks.



First some background:



container.ResolveAll();



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() 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.



--
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.

Reply via email to