コード例 #1
0
		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);
		}
コード例 #2
0
 public RabbitMQMessagingProvider()
 {
     localIp     = GetLocalIP();
     contextPool = new MessagingContextPool(new MessageFactory(this),
                                            CreateConnection);
 }
コード例 #3
0
		public RabbitMQMessagingProvider ()
		{
			localIp = GetLocalIP ();
			contextPool = new MessagingContextPool (new MessageFactory (this),
													CreateConnection);
		}
コード例 #4
0
 public RabbitMQMessageQueueTransaction(string txId, MessagingContextPool contextPool)
 {
     this.txId        = txId;
     this.contextPool = contextPool;
 }
コード例 #5
0
 public RabbitMQMessagingProvider()
 {
     localId     = Guid.NewGuid();
     contextPool = new MessagingContextPool(new MessageFactory(this),
                                            CreateConnection);
 }
コード例 #6
0
		public RabbitMQMessageQueueTransaction (string txId, MessagingContextPool contextPool)
		{
			this.txId = txId;
			this.contextPool = contextPool;
		}