Thanks for the feedback. Please feel free to make the modifications you
suggested by forking <http://help.github.com/forking/>Windsor and sending a
pull request <http://help.github.com/pull-requests/> when you are done.

-- Roelof.

On Tue, Nov 23, 2010 at 3:35 PM, Scott W. <[email protected]>wrote:

> Ok, once I installed the Castle Windsor source code I was able to
> determine my mistake.  I was incorrectly registering some generic base
> classes that I should have been excluding with .Unless statements.  In
> order to make it easier for users to debug this situation, I suggest
> you modify the following method:
>
>                protected override object ResolveCore(CreationContext
> context, bool
> requiresDecommission, bool instanceRequired)
>                {
>                        Type implType;
>                        try
>                        {
>                                implType =
> ComponentModel.Implementation.MakeGenericType(context.GenericArguments);
>                        }
>                        catch (ArgumentException)
>                        {
>                                // may throw in some cases when impl has
> generic constraints that
> service hasn't
>                                if(instanceRequired)
>                                {
>                                        throw;
>                                }
>                                return null;
>                        }
>
>                        var handler = GetSubHandler(context, implType);
>
>                        // so the generic version wouldn't be considered as
> well
>                        using(context.EnterResolutionContext(this, false))
>                        {
>                                return handler.Resolve(context);
>                        }
>                }
>
> In the catch(ArgumentException) if you could report back the
> implementation type that it was trying to instantiate, then it would
> have been trivial to catch my mistake.
>
> Thanks for the excellent framework by the way.  It's great!
>
> - Scott
>
> On Nov 23, 9:03 am, Roelof Blom <[email protected]> wrote:
> > The 2.5.2 release is tagged on Github:
> https://github.com/castleproject/Castle.Windsor/tree/2.5.2
> >
> > <https://github.com/castleproject/Castle.Windsor/tree/2.5.2>Thanks for
> > pointing out the wrong link.
> >
> > -- Roelof.
> >
> > On Tue, Nov 23, 2010 at 3:01 PM, Scott W. <[email protected]
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I found it athttps://github.com/castleproject/Castle.Windsor
> >
> > > By the way, your repository page points to
> > >https://github.com/castleproject/Castle.InversionOfControlwhich
> > > doesn't exist.
> >
> > > On Nov 23, 8:59 am, "Scott W." <[email protected]> wrote:
> > > > I'm going to need to get the source code for 2.5.2.  I see the git
> > > > repository web page, but how do I actually connect and get a certain
> > > > version?  I've used SVN and HG in the past, but I'm not familiar with
> > > > Git.
> >
> > > --
> > > 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]<castle-project-users%[email protected]><castle-project-users%2Bun
> [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]<castle-project-users%[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