public void ShouldAllocateReturnConnectionToPool () { CreateConnectionDelegate handler = delegate (string host) { return connection; }; MessagingContextPool pool = new MessagingContextPool (messageFactory, handler); IMessagingContext context1 = pool.GetContext ("foo"); Assert.IsNotNull (context1); context1.Dispose (); IMessagingContext context2 = pool.GetContext ("foo"); Assert.AreEqual (context1, context2); }
public RabbitMQMessagingProvider() { localIp = GetLocalIP(); contextPool = new MessagingContextPool(new MessageFactory(this), CreateConnection); }
public RabbitMQMessagingProvider () { localIp = GetLocalIP (); contextPool = new MessagingContextPool (new MessageFactory (this), CreateConnection); }
public RabbitMQMessageQueueTransaction(string txId, MessagingContextPool contextPool) { this.txId = txId; this.contextPool = contextPool; }
public RabbitMQMessagingProvider() { localId = Guid.NewGuid(); contextPool = new MessagingContextPool(new MessageFactory(this), CreateConnection); }
public RabbitMQMessageQueueTransaction (string txId, MessagingContextPool contextPool) { this.txId = txId; this.contextPool = contextPool; }