I'm not sure I want to ignore anything. If a user wants to register
something they should either get it registered or should be notified
it's not supported.
After giving it some more thoughts I'm thinking perhaps we should leave
the current behavior. If having IEnumerable<Something> is not your
intention be explicit about it and do not include it.
The idea with "system interfaces" is more complicated than it seems. In
reality all Microsoft interfaces are in System.something namespace so
having a blanket arbitrary rule to filter them out built into Windsor
doesn't look like such a good idea after all.
I think the solution I would advise and the one I'm leaning towards most
is to leave the behavior and API exactly as it is now, and just
recommend people to use WithiService.Select(be specific here) instead.
@K
bling wrote:
correction: "...since i would *not* expect that to throw..."
On Wednesday, July 11, 2012 9:42:25 AM UTC-4, bling wrote:
that would work.
however, i'm more questioning in the intent of the scanning
registration API, since i would expect that to throw any kind of
exception. worst case should be that you don't have something
registered. if that can still be the case, then you can simply
ignore IEnumerable<ValueType> instead of throwing.
if that won't fly, you could also do a
WithServiceAllInterfaces(bool excludeSystemInterfaces = true)
thx!
p.s. i've logged the bug at
http://issues.castleproject.org/issue/IOC-347
<http://issues.castleproject.org/issue/IOC-347>, although if you
add a new WithService* then it'd be more of a feature request.
On Tuesday, July 10, 2012 6:09:48 PM UTC-4, bling wrote:
the following works with 3.0, but throws an exception in 3.1
var c = new WindsorContainer();
c.Register(Classes.From(typeof(Dictionary<,>)).Pick().WithServiceBase().WithServiceAllInterfaces());
i'm not sure what the actual issue is, but exception message
complained about ICollection<KeyValuePair<,>> so i took a
guess and was able to reproduce. a class similar to that
signature does exist in my actual code.
thanks,
bling
--
You received this message because you are subscribed to the Google
Groups "Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/eTbUtzwyAZMJ.
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.