ninject / Ninject.Extensions.Conventions

Convention based binding for Ninject
Other
76 stars 28 forks source link

using more then one WhereTypeInheritsFrom #2

Closed nesizer closed 14 years ago

nesizer commented 14 years ago

maybe i don't understand it right but if i have a this code it works kernel = new StandardKernel(); kernel.Scan(scanner => { scanner.FromCallingAssembly(); scanner.WhereTypeIsNotInNamespace("NDjango"); scanner.FromAssembliesInPath(AppDomain.CurrentDomain.BaseDirectory); scanner.WhereTypeInheritsFrom(); });

but if i have this code it does not work kernel = new StandardKernel(); kernel.Scan(scanner => { scanner.FromCallingAssembly(); scanner.WhereTypeIsNotInNamespace("NDjango"); scanner.FromAssembliesInPath(AppDomain.CurrentDomain.BaseDirectory); scanner.WhereTypeInheritsFrom(); scanner.WhereTypeInheritsFrom(); });

it look like thee first WhereTypeInheritsFrom is excluding the other

idavis commented 14 years ago

This is by design. Use the new WhereTypeInheritsFromAny call