public void Complete(bool completedSynchronously, ErrorState errorState) { _errorState = errorState; CompletedSynchronously = completedSynchronously; _isCompleted = true; try { Interlocked.Exchange(ref _callback, SecondAsyncCallback).Invoke(this); } catch (Exception ex) { Trace.WriteError(Resources.Trace_OwinCallContextCallbackException, ex); } }
public void Fail(ErrorState error) { _error = error; TryComplete(); }
private void Complete(ErrorState errorState) { AsyncResult.Complete(_completedSynchronouslyThreadId == Thread.CurrentThread.ManagedThreadId, errorState); }
internal void Complete(bool sync, ErrorState errorState) { AbortIfHeaderSent(); AsyncResult.Complete(sync, errorState); }