Hi Nate,
I get a NullReferenceException:
[NullReferenceException: Riferimento a un oggetto non impostato su
un'istanza di oggetto.]
Ninject.Core.Binding.StandardBinder.<Ninject.Core.Binding.Syntax.IBindingConditionSyntax.ForMembersOf>b__0(IContext
ctx) +27
Ninject.Core.Infrastructure.PredicateCondition`1.Matches(T value)
+12
Ninject.Core.Binding.StandardBinding.Matches(IContext context) +112
Ninject.Core.Binding.StandardBindingSelector.GetMatchingBindings(IContext
context, IEnumerable`1 candidates) +139
Ninject.Core.Binding.StandardBindingSelector.SelectBinding(Type
service, IContext context) +503
Ninject.Core.KernelBase.ResolveBinding(Type service, IContext
context) +381
Ninject.Core.KernelBase.ResolveInstance(Type service, IContext
context, Boolean isEagerActivation) +298
Ninject.Core.KernelBase.Get() +119
Am I missing something?
thanks,
Giorgio
On Sep 4, 5:41 pm, "Nate Kohari" <
nkoh...@gmail.com> wrote:
> Giorgio:
> This is one of those cases where there are several ways of doing the same
> thing. The easiest way to bind for members of a certain type is:
>
> Bind<IWeapon>().To<Shuriken>().ForMembersOf<SuperNinja>();
>
> -Nate
>