For me it's more an issue the fact that "IWindsorContainer" and
"Component.For" are in different namespaces.
When I'm typing
    container.Register(Co
at this moment I didn't get completition because Component requires a
namespace to declare. I have to type "Component." then to agree with R# to
import required namespace.

Your proposal definitely will make API more discoverable. Will it also avoid
including a namespace for "Component"?


2011/4/19 Krzysztof Koźmic <[email protected]>

>  One of the most common complaints I'm hearing from people who want to
> start with Windsor is that our registration API is hard. That they go type
> container.Register and they get this:
>
> if they have ReSharper, or this if they use bare VS:
>
>
>
> And then they get lost hunting for what this IRegistration creature is and
> how do I get one. And they hunt for implementation and see classes like
> BasedOnDescriptor etc which confuse them even more. They don't know where to
> start, and even though the comment says "Use Component.For or
> AllTypes.FromAssembly" they don't see it because it doesn't jump out at them
> from intellisense.
>
> So I did a small experiment, and did some changes so that the intellisense
> experience is the following:
>
> And then when we get to pick actual overload:
>
>
> With ReSharper it's obviously much nicer:
>
>
>
> The way this works is I created the two additional overloads that have the
> entry types in their signatures (AllTypes and Component respectively) to
> give the user a hint about where they might look to start. I would update
> the tooltip help to be more helpful.
>
> The drawback of this is that if user tries to instantiate AllTypes or
> Component or look for types that inherit from then they'll be disappointed.
> The types are abstract with private constructor to ensure no one inherits
> from them (which would be pointless anyway). This also means that the two
> additional overloads will never get invoked.
>
> So my question to you is - what do you think about all of this? Does it
> help? Is it worth the effort (having two more overloads for mere benefit of
> some intellisense hints)? Do you have any better ideas?
>
> 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