Beispiel #1
0
            private void FinishCloseListeners(IAsyncResult result, bool completedSynchronously)
            {
                Exception exception = null;

                try
                {
                    CloseCollectionAsyncResult.End(result);
                }
                catch (Exception exception2)
                {
                    if (Fx.IsFatal(exception2) || completedSynchronously)
                    {
                        throw;
                    }
                    exception = exception2;
                }
                if (exception != null)
                {
                    this.CallComplete(completedSynchronously, exception);
                }
                else
                {
                    this.CloseInput(completedSynchronously);
                }
            }
Beispiel #2
0
            private void CloseChannelDispatchers(bool completedSynchronously)
            {
                IList <ICommunicationObject> collection = this.serviceHost.SnapshotChannelDispatchers();
                AsyncCallback otherCallback             = Fx.ThunkCallback(new AsyncCallback(this.CloseChannelDispatchersCallback));
                TimeSpan      timeout   = this.timeoutHelper.RemainingTime();
                Exception     exception = null;
                IAsyncResult  result    = null;

                try
                {
                    result = new CloseCollectionAsyncResult(timeout, otherCallback, this, collection);
                }
                catch (Exception exception2)
                {
                    if (Fx.IsFatal(exception2) || completedSynchronously)
                    {
                        throw;
                    }
                    exception = exception2;
                }
                if (exception != null)
                {
                    this.CallComplete(completedSynchronously, exception);
                }
                else if (result.CompletedSynchronously)
                {
                    this.FinishCloseChannelDispatchers(result, completedSynchronously);
                }
            }
Beispiel #3
0
            private void FinishCloseChannelDispatchers(IAsyncResult result, bool completedSynchronously)
            {
                Exception exception = null;

                try
                {
                    CloseCollectionAsyncResult.End(result);
                }
                catch (Exception exception2)
                {
                    if (Fx.IsFatal(exception2) || completedSynchronously)
                    {
                        throw;
                    }
                    exception = exception2;
                }
                this.CallComplete(completedSynchronously, exception);
            }
 public CallbackState(CloseCollectionAsyncResult result, ICommunicationObject instance)
 {
     _result = result;
     _instance = instance;
 }
Beispiel #5
0
 public CallbackState(CloseCollectionAsyncResult result, ICommunicationObject instance)
 {
     _result  = result;
     Instance = instance;
 }