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); } }
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); } }
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; }
public CallbackState(CloseCollectionAsyncResult result, ICommunicationObject instance) { _result = result; Instance = instance; }