Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ContinueWhenAnyImpl< TAntecedentResult >()

static Task< TResult > System.Threading.Tasks.TaskFactory< TResult >.ContinueWhenAnyImpl< TAntecedentResult > ( Task< TAntecedentResult >[] tasks,
Func< Task< TAntecedentResult >, TResult > continuationFunction,
Action< Task< TAntecedentResult > > continuationAction,
TaskContinuationOptions continuationOptions,
CancellationToken cancellationToken,
TaskScheduler scheduler )
inlinestaticpackage

Definition at line 801 of file TaskFactory.cs.

802 {
803 TaskFactory.CheckMultiTaskContinuationOptions(continuationOptions);
804 if (tasks == null)
805 {
806 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.tasks);
807 }
808 if (tasks.Length == 0)
809 {
810 ThrowHelper.ThrowArgumentException(ExceptionResource.Task_MultiTaskContinuation_EmptyTaskList, ExceptionArgument.tasks);
811 }
812 if (scheduler == null)
813 {
814 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.scheduler);
815 }
816 Task<Task> task = TaskFactory.CommonCWAnyLogic(tasks);
817 if (cancellationToken.IsCancellationRequested && (continuationOptions & TaskContinuationOptions.LazyCancellation) == 0)
818 {
820 }
821 if (continuationFunction != null)
822 {
824 }
826 }
static Task< TResult > CreateCanceledTask(TaskContinuationOptions continuationOptions, CancellationToken ct)

References System.cancellationToken, System.Threading.Tasks.TaskFactory< TResult >.CheckMultiTaskContinuationOptions(), System.Threading.Tasks.TaskFactory< TResult >.CommonCWAnyLogic(), System.continuationAction, System.continuationFunction, System.continuationOptions, System.scheduler, System.task, System.tasks, System.ThrowHelper.ThrowArgumentException(), and System.ThrowHelper.ThrowArgumentNullException().