示例#1
0
        public Task Handle(TMessage message, IMessageHandlerContext messageHandlerContext, CommandHandlerDelegate next)
        {
            if (messageHandlerContext is IMessageBrokerContext messageBrokerContext)
            {
                return(_brokeredMessageInbox.ReceiveViaInbox(message, messageBrokerContext, () => next()));
            }

            return(next());
        }
示例#2
0
        public Task Handle(TMessage message, IMessageHandlerContext messageHandlerContext, CommandHandlerDelegate next)
        {
            _logger.LogDebug($"Entering {nameof(InboxBehavior<TMessage>)}");
            if (messageHandlerContext is IMessageBrokerContext messageBrokerContext)
            {
                return(_brokeredMessageInbox.ReceiveViaInbox(message, messageBrokerContext, () => next()));
            }

            return(next());
        }