public void SetException(Exception exception) { _tcs.SetException(exception); }
/// <summary> /// Transitions the underlying <see cref="Task"/> into the <see cref="TaskStatus.Faulted"/> state. /// </summary> /// <param name="exception">The exception to bind to this <see cref="Task"/>. May not be <c>null</c>.</param> /// <exception cref="InvalidOperationException">The underlying <see cref="Task"/> has already been completed.</exception> public void SetException(Exception exception) { _tcs.SetException(exception); }