Example #1
0
            public SynchronizedAsyncResult(Microsoft.ServiceBus.Channels.SynchronizedMessageSource syncSource, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state)
            {
                bool flag;

                this.syncSource    = syncSource;
                this.timeoutHelper = new Microsoft.ServiceBus.Common.TimeoutHelper(timeout);
                if (!syncSource.sourceLock.Enter(Microsoft.ServiceBus.Channels.SynchronizedMessageSource.SynchronizedAsyncResult <T> .onEnterComplete, this))
                {
                    return;
                }
                this.exitLock = true;
                bool flag1 = false;

                try
                {
                    flag  = this.PerformOperation(this.timeoutHelper.RemainingTime());
                    flag1 = true;
                }
                finally
                {
                    if (!flag1)
                    {
                        this.ExitLock();
                    }
                }
                if (flag)
                {
                    this.CompleteWithUnlock(true);
                }
            }
Example #2
0
 protected void SetMessageSource(Microsoft.ServiceBus.Channels.IMessageSource messageSource)
 {
     this.messageSource = new Microsoft.ServiceBus.Channels.SynchronizedMessageSource(messageSource);
 }
Example #3
0
 public ReceiveAsyncResult(Microsoft.ServiceBus.Channels.SynchronizedMessageSource syncSource, TimeSpan timeout, AsyncCallback callback, object state) : base(syncSource, timeout, callback, state)
 {
 }