You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So say I have a type that implements interfaces like this:
public class MessageHandler : IHandle<MessageOne>, IHandle<MessageTwo>, IHandle<MessageThree> {
...
}
Binding with conventions doesn't seem to work when
IKernel container = new StandardKernel();
container.Bind(x =>
x.FromAssemblyContaining<MessageHandler>()
.SelectAllClasses()
.InheritedFrom(typeof(IHandle<>))
.BindToSelf())
);
var handlers = container.GetAll(typeof(IHandle<MessageOne>)); // handlers is just empty after trying to get the services