예제 #1
0
        private IMessageHandlingRunnable CreateMessageHandlingTask(IMessageHandler handler, IMessage message)
        {
            var messageHandlingRunnable = new MessageHandlingRunnable(this, handler, message);

            if (MessageHandlingDecorator != null)
            {
                return(MessageHandlingDecorator.Decorate(messageHandlingRunnable));
            }

            return(messageHandlingRunnable);
        }
예제 #2
0
        private IMessageHandlingRunnable CreateMessageHandlingTask(IMessage message, CancellationToken cancellationToken)
        {
            var messageHandlingRunnable = new MessageHandlingRunnable(this, message, cancellationToken);

            if (MessageHandlingDecorator != null)
            {
                return(MessageHandlingDecorator.Decorate(messageHandlingRunnable));
            }

            return(messageHandlingRunnable);
        }