コード例 #1
0
        public void SetUp()
        {
            exchangeDeclareCount = 0;

            publishExchangeDeclareStrategy = new PublishExchangeDeclareStrategy();
            advancedBus = MockRepository.GenerateStub<IAdvancedBus>();

            advancedBus
                .Stub(x => x.ExchangeDeclare(exchangeName, "topic"))
                .Return(exchange)
                .WhenCalled(x => exchangeDeclareCount++);
        }
コード例 #2
0
        public void SetUp()
        {
            exchangeDeclareCount = 0;

            publishExchangeDeclareStrategy = new PublishExchangeDeclareStrategy();
            advancedBus = MockRepository.GenerateStub<IAdvancedBus>();
            exchange = new Exchange(exchangeName);
            exchangeTask = TaskHelpers.FromResult(exchange);
            advancedBus
                .Stub(x => x.ExchangeDeclareAsync(exchangeName, "topic"))
                .Return(exchangeTask)
                .WhenCalled(x => exchangeDeclareCount++);
        }
コード例 #3
0
ファイル: RabbitBus.cs プロジェクト: still-adam-k/EasyNetQ
        public RabbitBus(
            IConventions conventions,
            IAdvancedBus advancedBus,
            IPublishExchangeDeclareStrategy publishExchangeDeclareStrategy,
            IMessageDeliveryModeStrategy messageDeliveryModeStrategy,
            IRpc rpc,
            ISendReceive sendReceive,
            ConnectionConfiguration connectionConfiguration)
        {
            Preconditions.CheckNotNull(conventions, "conventions");
            Preconditions.CheckNotNull(advancedBus, "advancedBus");
            Preconditions.CheckNotNull(publishExchangeDeclareStrategy, "publishExchangeDeclareStrategy");
            Preconditions.CheckNotNull(rpc, "rpc");
            Preconditions.CheckNotNull(sendReceive, "sendReceive");
            Preconditions.CheckNotNull(connectionConfiguration, "connectionConfiguration");

            this.conventions = conventions;
            this.advancedBus = advancedBus;
            this.publishExchangeDeclareStrategy = publishExchangeDeclareStrategy;
            this.messageDeliveryModeStrategy    = messageDeliveryModeStrategy;
            this.rpc                     = rpc;
            this.sendReceive             = sendReceive;
            this.connectionConfiguration = connectionConfiguration;
        }
コード例 #4
0
ファイル: TransactionalRpc.cs プロジェクト: muncinsky/munERP
 public TransactionalRpc(ConnectionConfiguration connectionConfiguration, IAdvancedBus advancedBus, IEventBus eventBus, IConventions conventions, IPublishExchangeDeclareStrategy publishExchangeDeclareStrategy, IMessageDeliveryModeStrategy messageDeliveryModeStrategy, ITimeoutStrategy timeoutStrategy, ITypeNameSerializer typeNameSerializer)
     : base(connectionConfiguration, advancedBus, eventBus, conventions, publishExchangeDeclareStrategy, messageDeliveryModeStrategy, timeoutStrategy, typeNameSerializer)
 {
     this.timeoutStrategy = timeoutStrategy;
 }