Yes, unless we hit handler filter. Have a look at how handler selector
is working
On 02/03/2011 11:51 PM, Craig Neuwirt wrote:
right, but I thought your change will no longer use
GetAssignableHandlers, but rather handlers for a specific interface
On Mar 2, 2011, at 7:40 AM, Krzysztof Koźmic wrote:
Craig,
IHandlersFilter is modelled after IHandlersSelector which works off
of what's returned from GetAssignableHandlers().
Krzysztof
On 02/03/2011 11:22 PM, Craig Neuwirt wrote:
How could an IHandlerFilter make it behave like that? Wouldn't the
handlers passed to it already by too restricted?
On Mar 2, 2011, at 6:23 AM, Krzysztof Koźmic 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
<http://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]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:[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.
--
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]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:[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.
--
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.