Ejemplo n.º 1
0
        protected override void OnAbort()
        {
            ICommunicationObject   batchManager;
            SbmpMessageCreator     messageCreator = this.MessageCreator;
            IRequestSessionChannel channel        = this.SbmpMessagingFactory.Channel;

            if (base.BatchingEnabled)
            {
                batchManager = this.BatchManager;
            }
            else
            {
                batchManager = null;
            }
            CloseOrAbortLinkAsyncResult closeOrAbortLinkAsyncResult = new CloseOrAbortLinkAsyncResult(messageCreator, channel, batchManager, this.OperationTimeout, true, new AsyncCallback(SbmpMessageSender.AbortCallback), null);

            closeOrAbortLinkAsyncResult.Schedule();
        }
 protected override IEnumerator <IteratorAsyncResult <SbmpSubscriptionClient.CloseAsyncResult> .AsyncStep> GetAsyncSteps()
 {
     if (!this.aborting)
     {
         if (this.parent.ControlMessageCreator.IsValueCreated)
         {
             SbmpSubscriptionClient.CloseAsyncResult closeAsyncResult = this;
             IteratorAsyncResult <SbmpSubscriptionClient.CloseAsyncResult> .BeginCall beginCall = (SbmpSubscriptionClient.CloseAsyncResult thisPtr, TimeSpan t, AsyncCallback c, object s) => (new CloseOrAbortLinkAsyncResult(thisPtr.parent.ControlMessageCreator.Value, ((SbmpMessagingFactory)thisPtr.parent.MessagingFactory).Channel, null, t, false, c, s)).Start();
             yield return(closeAsyncResult.CallAsync(beginCall, (SbmpSubscriptionClient.CloseAsyncResult thisPtr, IAsyncResult r) => AsyncResult <CloseOrAbortLinkAsyncResult> .End(r), IteratorAsyncResult <TIteratorAsyncResult> .ExceptionPolicy.Transfer));
         }
         SbmpSubscriptionClient.CloseAsyncResult closeAsyncResult1 = this;
         IteratorAsyncResult <SbmpSubscriptionClient.CloseAsyncResult> .BeginCall beginCall1 = (SbmpSubscriptionClient.CloseAsyncResult thisPtr, TimeSpan t, AsyncCallback c, object s) => thisPtr.parent.BaseBeginClose(t, c, s);
         yield return(closeAsyncResult1.CallAsync(beginCall1, (SbmpSubscriptionClient.CloseAsyncResult thisPtr, IAsyncResult r) => thisPtr.parent.EndBaseClose(r), IteratorAsyncResult <TIteratorAsyncResult> .ExceptionPolicy.Transfer));
     }
     else
     {
         if (this.parent.ControlMessageCreator.IsValueCreated)
         {
             CloseOrAbortLinkAsyncResult closeOrAbortLinkAsyncResult = new CloseOrAbortLinkAsyncResult(this.parent.ControlMessageCreator.Value, ((SbmpMessagingFactory)this.parent.MessagingFactory).Channel, null, base.RemainingTime(), true, null, null);
             closeOrAbortLinkAsyncResult.Schedule();
         }
         this.parent.BaseAbort();
     }
 }
Ejemplo n.º 3
0
        protected sealed override void OnAbort()
        {
            CloseOrAbortLinkAsyncResult closeOrAbortLinkAsyncResult = new CloseOrAbortLinkAsyncResult(this.MessageCreator, this.SbmpMessagingFactory.Channel, null, string.Empty, this.OperationTimeout, true, new AsyncCallback(SbmpMessageBrowser.AbortCallback), null);

            closeOrAbortLinkAsyncResult.Schedule();
        }