multiple types for SetHandlerInterface() with membus and ioc container
问题 Going over demo CQRS code here the command and event handlers are wired up separately as below: public interface CommandHandler<in T> { void Handle(T command); } public interface EventHandler<in T> { void Handle(T @event); } bus = BusSetup.StartWith<Conservative>() .Apply<FlexibleSubscribeAdapter>(a => { a.ByInterface(typeof(IHandleEvent<>)); a.ByInterface(typeof(IHandleCommand<>)); }) .Construct(); I am using an IoC container hooked in with membus and it works a dream by implementing the