Exemplo n.º 1
0
        public IRabbitExchange DeclareExchange(string name, ExchangeOptions options)
        {
            var exchange = new StubRabbitExchange(name, options, (o => null));

            _exchangesDeclared.Add(exchange);
            return(exchange);
        }
Exemplo n.º 2
0
        public IRabbitExchange DeclareExchangeNoWait(string name, ExchangeOptions options)
        {
            EnsureNotDisposed();

            var exchange = new StubRabbitExchange(name, options, (o => null));

            _exchangesDeclaredNoWait.Add(exchange);
            return(exchange);
        }
Exemplo n.º 3
0
        IRabbitQueueBinding IRabbitChannelInternal.BindInternal(bool nowait, string queue, string exchange, string routingKeyOrFilter)
        {
            EnsureNotDisposed();

            var ex = new StubRabbitExchange(exchange, new ExchangeOptions());
            var q  = new StubRabbitQueue(queue, new QueueOptions());

            return(nowait ?
                   this.BindNoWait(ex, q, routingKeyOrFilter) :
                   this.Bind(ex, q, routingKeyOrFilter));
        }
Exemplo n.º 4
0
        public StubRabbitChannel(ChannelOptions options)
        {
            this.Options = options;

            _defaultExchange = new StubRabbitExchange("", new ExchangeOptions(), o => null);

            _queuesDeclared       = new List <StubRabbitQueue>();
            _queuesDeclaredNoWait = new List <StubRabbitQueue>();

            _exchangesDeclared       = new List <StubRabbitExchange>();
            _exchangesDeclaredNoWait = new List <StubRabbitExchange>();

            _bound       = new List <StubRabbitQueueBinding>();
            _boundNoWait = new List <StubRabbitQueueBinding>();
            _unbound     = new List <StubRabbitQueueBinding>();
        }