コード例 #1
0
        public RabbitMqEnhancedTransport(ITransport inner, IRebusLoggerFactory rebusLoggerFactory)
        {
            if (rebusLoggerFactory == null)
            {
                throw new ArgumentNullException("rebusLoggerFactory cannot be null");
            }

            _inner             = inner ?? throw new ArgumentNullException("inner transport cannot be null");
            _log               = rebusLoggerFactory.GetLogger <RabbitMqEnhancedTransport>();
            _mangler           = new RabbitMqMangler(inner, rebusLoggerFactory);
            _topicExchangeName = _mangler.GetTopicExchangeName();
        }
        public RabbitMqEnhacedSubscriptionStorage(string exchangeName, ISubscriptionStorage inner, ITransport transport, IRebusLoggerFactory rebusLoggerFactory)
        {
            if (rebusLoggerFactory == null)
            {
                throw new ArgumentNullException("rebusLoggerFactory cannot be null");
            }

            _log              = rebusLoggerFactory.GetLogger <RabbitMqEnhacedSubscriptionStorage>();
            _inner            = inner ?? throw new ArgumentNullException("inner subscriptionStorage cannot be null");
            _transport        = transport ?? throw new ArgumentNullException("transport cannot be null");
            _mangler          = new RabbitMqMangler(transport, rebusLoggerFactory);
            LocalExchangeName = exchangeName;
        }