예제 #1
0
 /// <summary>
 /// Transitions the underlying task into the <see cref="SystemTasks.TaskStatus.Faulted"/> state
 /// and binds it to a specified exception.
 /// </summary>
 public static void SetException(SystemTasks.TaskCompletionSource <TResult> tcs, Exception exception) =>
 tcs.SetException(exception);
예제 #2
0
 /// <summary>
 /// Transitions the underlying task into the <see cref="SystemTasks.TaskStatus.Faulted"/> state
 /// and binds a collection of exception objects to it.
 /// </summary>
 public static void SetException(SystemTasks.TaskCompletionSource <TResult> tcs,
                                 IEnumerable <Exception> exceptions) =>
 tcs.SetException(exceptions);