Exemple #1
0
        public override bool TryGetMessage <T>(out ConsumeContext <T> consumeContext)
        {
            if (base.TryGetMessage(out ConsumeContext <T> messageContext))
            {
                consumeContext = new MessageConsumeContext <T>(this, messageContext.Message);
                return(true);
            }

            consumeContext = null;
            return(false);
        }
        public virtual bool TryGetMessage <T>(out ConsumeContext <T> consumeContext)
            where T : class
        {
            ConsumeContext <T> messageContext;

            if (_context.TryGetMessage(out messageContext))
            {
                consumeContext = new MessageConsumeContext <T>(this, messageContext.Message);
                return(true);
            }

            consumeContext = null;
            return(false);
        }