示例#1
0
        protected override IAsyncResult OnBeginCreateReceiver(TimeSpan timeout, AsyncCallback callback, object state)
        {
            string str = EntityNameHelper.FormatSubscriptionPath(base.Path, base.ClientId);
            AmqpMessageReceiver amqpMessageReceiver = new AmqpMessageReceiver(this.messagingFactory, str, new MessagingEntityType?(MessagingEntityType.VolatileTopicSubscription), base.RetryPolicy, ReceiveMode.ReceiveAndDelete, base.Filter);

            return(new CompletedAsyncResult <AmqpMessageReceiver>(amqpMessageReceiver, callback, state));
        }
示例#2
0
 public ReceiveMessageAsyncResult(AmqpMessageReceiver parent, bool shouldThrowTimeout, TimeSpan timeout, AsyncCallback callback, object state) : base(parent, shouldThrowTimeout, timeout, callback, state)
 {
     base.Start();
 }
示例#3
0
 public ReceiveEventAsyncResult(AmqpMessageReceiver parent, int maxCount, bool shouldThrowTimeout, TimeSpan timeout, AsyncCallback callback, object state) : base(parent, shouldThrowTimeout, timeout, callback, state)
 {
     this.maxCount = maxCount;
     base.Start();
 }
示例#4
0
 protected ReceiveAsyncResult(AmqpMessageReceiver parent, bool shouldThrowTimeout, TimeSpan timeout, AsyncCallback callback, object state) : base(timeout, callback, state)
 {
     this.parent             = parent;
     this.shouldThrowTimeout = shouldThrowTimeout;
 }
示例#5
0
 public DisposeMessageAsyncResult(AmqpMessageReceiver parent, IEnumerable <Guid> lockTokens, Outcome outcome, bool batchable, TimeSpan timeout, AsyncCallback callback, object state) : base(parent, outcome, batchable, timeout, callback, state)
 {
     this.lockTokens = lockTokens;
     Fx.AssertIsNotNull(this.lockTokens, "lockToken collection should not be null");
     base.Start();
 }
示例#6
0
 public DisposeEventAsyncResult(AmqpMessageReceiver parent, IEnumerable <ArraySegment <byte> > deliveryTags, Outcome outcome, bool batchable, TimeSpan timeout, AsyncCallback callback, object state) : base(parent, outcome, batchable, timeout, callback, state)
 {
     this.deliveryTags = deliveryTags;
     Fx.AssertIsNotNull(this.deliveryTags, "offsets collection should not be null");
     base.Start();
 }
示例#7
0
 protected DisposeAsyncResult(AmqpMessageReceiver parent, Outcome outcome, bool batchable, TimeSpan timeout, AsyncCallback callback, object state) : base(timeout, callback, state)
 {
     this.parent    = parent;
     this.outcome   = outcome;
     this.batchable = batchable;
 }