Reputation: 2743
I'd like to 'any interface that inherits one or more interfaces from this list of interfaces' to a specific provider using ninject 2. Would an implementation of IBindingResolver be appropriate here?
Upvotes: 1
Views: 154
Reputation: 32725
no - use ninject.extensions.conventions instead
kernel.Bind(
x => x.FromThisAssembly()
.SelectTypesInheritedFrom<IMyInterface>()
.BindToAllInterfaces()
.Configure((c, s) => c.InSingletonScope()));
Upvotes: 1