Reply inline below.
> ::See Below
>
> > Would it be too auto-magic to make it so it scores the .ctor
> > with the most parameters that can be resolved.
>
> This is what it currently does. The scorer will add one point for each
parameter for which there exists a binding on the parameter type. If you
specify an inject attribute, > it will give that .ctor the highest score.
I apologise. The last build that I downloaded only did it on the .ctor with
the most parameters (whether they were resolvable or not). I hadn't realized
this had changed.
>
> > So in this case, if I've bound IMyDep to MyDepImple, but not
> > bound anything for a string parameter called "name". The third .ctor
> > would be called.
>
> The third should be called as it stands right now (I believe) as it is
tied for the highest score and is last in the list and when sorted, should
be on the top of the list.
>
> > kernel.Bind<IMyDep>().To<MyDepImple>().PreferableTo<IMyDep2>();
>
> Not sure about this. You it seems like there is something wrong with the
design or intention if your object is set up in that fashion. Can you give a
real example?
I encountered this when I first starting using Ninject and wasn't
using it correctly. I was stupidly using it to resolve a data provider, from
the System.Data library. One of the arguments on the provider I was using
was an optional string argument, that I wasn't using anyway.
>
> Thanks,
>
> Ian
Thanks,
Ben