public void Handle(Message message, IBusForHandler bus) { this.context.HandlerCalled(); if (message.AbortSync) { bus.DoNotContinueDispatchingCurrentMessageToHandlers(); } }
public Task Handle(Message message, IBusForHandler bus) { context.SecondHandlerCalls += 1; if (message.AbortSecondHandler) { bus.DoNotContinueDispatchingCurrentMessageToHandlers(); } return(Task.FromResult(0)); }
public Task Handle(Message message, IBusForHandler bus) { this.context.AsyncHandlerCalled(); if (message.AbortAsync) { bus.DoNotContinueDispatchingCurrentMessageToHandlers(); } return(Task.FromResult(0)); }
public Task Handle(Message message, IBusForHandler bus) { context.FirstHandlerCalls += 1; if (message.AbortFirstHandler) { bus.DoNotContinueDispatchingCurrentMessageToHandlers(); } return(Task.CompletedTask); }