public void Fault(RequestChannel channel) { if (this.ShouldComplete()) { this.Complete(false, parent.GetTerminalException()); } }
public void Abort(RequestChannel channel) { if (this.ShouldComplete()) { this.Complete(false, parent.CreateClosedException()); } }
public void Fault(RequestChannel channel) { lock (ThisLock) { if (!_completed) { _faulted = true; _completed = true; Fx.Assert(_tcs?.Task == null || !_tcs.Task.IsCompleted, "Task should be null or not already be completed"); _tcs?.SetResult(null); } } }
public void Fault(RequestChannel channel) { lock (this.ThisLock) { if (!this.completed) { this.faulted = true; this.completed = true; if (this.completedHandle != null) { this.completedHandle.Set(); } } } }
public WaitForPendingRequestsAsyncResult(TimeSpan timeout, RequestChannel requestChannel, IRequestBase[] pendingRequests, AsyncCallback callback, object state) : base(callback, state) { this.requestChannel = requestChannel; this.pendingRequests = pendingRequests; this.timeout = timeout; if ((this.timeout == TimeSpan.Zero) || (this.pendingRequests == null)) { this.AbortRequests(); this.CleanupEvents(); base.Complete(true); } else { this.waitHandle = ThreadPool.UnsafeRegisterWaitForSingleObject(this.requestChannel.closedEvent, completeWaitCallBack, this, TimeoutHelper.ToMilliseconds(timeout), true); } }
public void Fault(RequestChannel requestChannel) { Cleanup(); }
public void Abort(RequestChannel requestChannel) { Cleanup(); }
public void Abort(RequestChannel channel) { Cleanup(); _abortReason = HttpAbortReason.Aborted; }