Пример #1
0
 /// <summary>
 /// Attempts to transition the underlying task into the <see cref="SystemTasks.TaskStatus.Faulted"/> state
 /// and binds a collection of exception objects to it.
 /// </summary>
 public static bool TrySetException(SystemTasks.TaskCompletionSource <TResult> tcs, IEnumerable <Exception> exceptions) =>
 tcs.TrySetException(exceptions);
Пример #2
0
 /// <summary>
 /// Attempts to transition the underlying task into the <see cref="SystemTasks.TaskStatus.Faulted"/> state
 /// and binds it to a specified exception.
 /// </summary>
 public static bool TrySetException(SystemTasks.TaskCompletionSource <TResult> tcs, Exception exception) =>
 tcs.TrySetException(exception);