TaskFactory.ContinueWhenAll 메서드

정의

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

오버로드

ContinueWhenAll(Task[], Action<Task[]>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll(Task[], Action<Task[]>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll(Task[], Action<Task[]>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll(Task[], Action<Task[]>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

ContinueWhenAll(Task[], Action<Task[]>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task ^> ^> ^ continuationAction);
public System.Threading.Tasks.Task ContinueWhenAll (System.Threading.Tasks.Task[] tasks, Action<System.Threading.Tasks.Task[]> continuationAction);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Action<System.Threading.Tasks.Task[]> -> System.Threading.Tasks.Task
Public Function ContinueWhenAll (tasks As Task(), continuationAction As Action(Of Task())) As Task

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

예제

다음 예제에서는 텍스트 파일 집합의 단어 수를 계산 하는 정규식을 사용 하는 별도 작업을 시작 합니다.The following example launches separate tasks that use a regular expression to count the number of words in a set of text files. ContinueWhenAll 메서드를 사용 하는 모든 선행 작업이 완료 되 면 전체 단어 수를 표시 하는 작업을 시작 합니다.The ContinueWhenAll method is used to launch a task that displays the total word count when all the antecedent tasks have completed.

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

public class Example
{
   public static void Main()
   {
      string[] filenames = { "chapter1.txt", "chapter2.txt", 
                             "chapter3.txt", "chapter4.txt",
                             "chapter5.txt" };
      string pattern = @"\b\w+\b";
      var tasks = new List<Task>();  
      int totalWords = 0;
        
      // Determine the number of words in each file.
      foreach (var filename in filenames) 
         tasks.Add( Task.Factory.StartNew( fn => { if (! File.Exists(fn.ToString()))
                                                      throw new FileNotFoundException("{0} does not exist.", filename);

                                                   StreamReader sr = new StreamReader(fn.ToString());
                                                   String content = sr.ReadToEnd();
                                                   sr.Close();
                                                   int words = Regex.Matches(content, pattern).Count;
                                                   Interlocked.Add(ref totalWords, words); 
                                                   Console.WriteLine("{0,-25} {1,6:N0} words", fn, words); }, 
                                           filename));

      var finalTask = Task.Factory.ContinueWhenAll(tasks.ToArray(), wordCountTasks => {
                                                    int nSuccessfulTasks = 0;
                                                    int nFailed = 0;
                                                    int nFileNotFound = 0;
                                                    foreach (var t in wordCountTasks) {
                                                       if (t.Status == TaskStatus.RanToCompletion) 
                                                          nSuccessfulTasks++;
                                                       
                                                       if (t.Status == TaskStatus.Faulted) {
                                                          nFailed++;  
                                                          t.Exception.Handle( (e) => { 
                                                             if (e is FileNotFoundException)
                                                                nFileNotFound++;
                                                             return true;   
                                                          });
                                                       } 
                                                    }   
                                                    Console.WriteLine("\n{0,-25} {1,6} total words\n", 
                                                                      String.Format("{0} files", nSuccessfulTasks), 
                                                                      totalWords); 
                                                    if (nFailed > 0) {
                                                       Console.WriteLine("{0} tasks failed for the following reasons:", nFailed);
                                                       Console.WriteLine("   File not found:    {0}", nFileNotFound);
                                                       if (nFailed != nFileNotFound)
                                                          Console.WriteLine("   Other:          {0}", nFailed - nFileNotFound);
                                                    } 
                                                    });  
      finalTask.Wait();                                                                  
   }
}
// The example displays output like the following:
//       chapter2.txt               1,585 words
//       chapter1.txt               4,012 words
//       chapter5.txt               4,660 words
//       chapter3.txt               7,481 words
//       
//       4 files                    17738 total words
//       
//       1 tasks failed for the following reasons:
//          File not found:    1
Imports System.Collections.Generic
Imports System.IO
Imports System.Threading
Imports System.Threading.Tasks
Imports System.Text.RegularExpressions

Module Example
   Dim totalWords As Integer = 0
   
   Public Sub Main()
      Dim filenames() As String = { "chapter1.txt", "chapter2.txt", 
                                    "chapter3.txt", "chapter4.txt",
                                    "chapter5.txt" }
      Dim pattern As String = "\b\w+\b"
      Dim tasks As New List(Of Task)()  
        
      ' Determine the number of words in each file.
      For Each filename In filenames 
         tasks.Add(Task.Factory.StartNew( Sub(fn)
                                             If Not File.Exists(filename)
                                                Throw New FileNotFoundException("{0} does not exist.", filename)
                                             End If
                                             
                                             Dim sr As New StreamReader(fn.ToString())
                                             Dim content As String = sr.ReadToEnd()
                                             sr.Close()
                                             Dim words As Integer = Regex.Matches(content, pattern).Count
                                             Interlocked.Add(totalWords, words) 
                                             Console.WriteLine("{0,-25} {1,6:N0} words", fn, words)
                                          End Sub, filename))
      Next
      
      Dim finalTask As Task = Task.Factory.ContinueWhenAll(tasks.ToArray(), 
                                                           Sub(wordCountTasks As Task() )
                                                              Dim nSuccessfulTasks As Integer = 0
                                                              Dim nFailed As Integer = 0
                                                              Dim nFileNotFound As Integer = 0
                                                              For Each t In wordCountTasks
                                                                 If t.Status = TaskStatus.RanToCompletion Then _ 
                                                                    nSuccessfulTasks += 1
                                                       
                                                                 If t.Status = TaskStatus.Faulted Then
                                                                    nFailed += 1  
                                                                    t.Exception.Handle(Function(e As Exception) 
                                                                                          If TypeOf e Is FileNotFoundException Then
                                                                                             nFileNotFound += 1
                                                                                          End If   
                                                                                          Return True   
                                                                                       End Function)                       
                                                                 End If 
                                                              Next   
                                                              Console.WriteLine()
                                                              Console.WriteLine("{0,-25} {1,6} total words", 
                                                                                String.Format("{0} files", nSuccessfulTasks), 
                                                                                totalWords) 
                                                              If nFailed > 0 Then
                                                                 Console.WriteLine()
                                                                 Console.WriteLine("{0} tasks failed for the following reasons:", nFailed)
                                                                 Console.WriteLine("   File not found:    {0}", nFileNotFound)
                                                                 If nFailed <> nFileNotFound Then
                                                                    Console.WriteLine("   Other:          {0}", nFailed - nFileNotFound)
                                                                 End If 
                                                              End If
                                                           End Sub)
      finalTask.Wait()                                                                  
   End Sub
   
   Private Sub DisplayResult(wordCountTasks As Task())
   End Sub
End Module
' The example displays output like the following:
'       chapter2.txt               1,585 words
'       chapter1.txt               4,012 words
'       chapter5.txt               4,660 words
'       chapter3.txt               7,481 words
'       
'       4 files                    17738 total words
'       
'       1 tasks failed for the following reasons:
'          File not found:    1

연속 작업의 호출 Task.Wait 메서드 예제 검사 되므로 선행 작업에서 throw 된 예외를 처리 하도록 허용 하지 않습니다는 Task.Status 작업에 성공 했는지 여부를 확인 하려면 각 선행 작업의 속성입니다.The call to the continuation task's Task.Wait method does not allow it to handle exceptions thrown by the antecedent tasks, so the example examines the Task.Status property of each antecedent task to determine whether the task succeeded.

설명

ContinueWhenAll 메서드가 실행 합니다 continuationAction 시 모든 작업이 대리자는 tasks 그 완료 상태에 관계 없이 배열을 완료 합니다.The ContinueWhenAll method executes the continuationAction delegate when all tasks in the tasks array have completed, regardless of their completion status.

작업에서 throw 된 예외는 tasks 구조적된 예외 처리를 통해 연속 작업에 사용할 수 없는 배열입니다.Exceptions thrown by tasks in the tasks array are not available to the continuation task through structured exception handling. 예외를 검사 하 여 throw 된 것을 확인할 수 있습니다는 Task.Exception 에서 각 태스크의 속성을 tasks 배열입니다.You can determine which exceptions were thrown by examining the Task.Exception property of each task in the tasks array. 구조적된 예외 처리의 작업에서 throw 된 예외를 처리 하는 데는 tasks 배열, 호출 된 Task.WaitAll(Task[]) 메서드.To use structured exception handling to handle exceptions thrown by tasks in the tasks array, call the Task.WaitAll(Task[]) method.

추가 정보

ContinueWhenAll(Task[], Action<Task[]>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task ^> ^> ^ continuationAction, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ContinueWhenAll (System.Threading.Tasks.Task[] tasks, Action<System.Threading.Tasks.Task[]> continuationAction, System.Threading.CancellationToken cancellationToken);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Action<System.Threading.Tasks.Task[]> * System.Threading.CancellationToken -> System.Threading.Tasks.Task

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

또는-or- cancellationToken을 만든 CancellationTokenSource가 이미 삭제되었습니다.The CancellationTokenSource that created cancellationToken has already been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

예제

다음 예제에서는 구분 텍스트 파일 집합의 단어 수를 계산 하는 정규식을 사용 하는 작업에 전달 된 취소 토큰을 만듭니다.The following example creates a cancellation token, which it passes to separate tasks that use a regular expression to count the number of words in a set of text files. 취소 토큰 파일을 찾을 수 없는 경우에 설정 됩니다.The cancellation token is set if a file cannot be found. ContinueWhenAll(Task[], Action{Task[]}, CancellationToken) 메서드를 사용 하는 모든 선행 작업이 완료 되 면 전체 단어 수를 표시 하는 작업을 시작 합니다.The ContinueWhenAll(Task[], Action{Task[]}, CancellationToken) method is used to launch a task that displays the total word count when all the antecedent tasks have completed. 취소 토큰으로 설정 된 경우 나타내는 하나 이상의 작업이 취소 되었으면을 처리는 AggregateException 예외 및 오류 메시지를 표시 합니다.If the cancellation token is set, which indicates that one or more tasks have been cancelled, it handles the AggregateException exception and displays an error message.

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

public class Example
{
   public static void Main()
   {
      string[] filenames = { "chapter1.txt", "chapter2.txt", 
                             "chapter3.txt", "chapter4.txt",
                             "chapter5.txt" };
      string pattern = @"\b\w+\b";
      var tasks = new List<Task>();  
      CancellationTokenSource source = new CancellationTokenSource();
      CancellationToken token = source.Token;
      int totalWords = 0;
        
      // Determine the number of words in each file.
      foreach (var filename in filenames)
         tasks.Add( Task.Factory.StartNew( fn => { token.ThrowIfCancellationRequested(); 

                                                   if (! File.Exists(fn.ToString())) {
                                                      source.Cancel();
                                                      token.ThrowIfCancellationRequested();
                                                   }
                                                   
                                                   StreamReader sr = new StreamReader(fn.ToString());
                                                   String content = sr.ReadToEnd();
                                                   sr.Close();
                                                   int words = Regex.Matches(content, pattern).Count;
                                                   Interlocked.Add(ref totalWords, words); 
                                                   Console.WriteLine("{0,-25} {1,6:N0} words", fn, words); }, 
                                           filename, token));

      var finalTask = Task.Factory.ContinueWhenAll(tasks.ToArray(), wordCountTasks => {
                                                    if (! token.IsCancellationRequested) 
                                                       Console.WriteLine("\n{0,-25} {1,6} total words\n", 
                                                                         String.Format("{0} files", wordCountTasks.Length), 
                                                                         totalWords); 
                                                   }, token); 
      try {                                                   
         finalTask.Wait();
      }
      catch (AggregateException ae) {
         foreach (Exception inner in ae.InnerExceptions)
            if (inner is TaskCanceledException)
               Console.WriteLine("\nFailure to determine total word count: a task was cancelled.");
            else
               Console.WriteLine("\nFailure caused by {0}", inner.GetType().Name);      
      }
      finally {
         source.Dispose();
      }
   }
}
// The example displays output like the following:
//       chapter2.txt               1,585 words
//       chapter1.txt               4,012 words
//       
//       Failure to determine total word count: a task was cancelled.
Imports System.Collections.Generic
Imports System.IO
Imports System.Threading
Imports System.Threading.Tasks
Imports System.Text.RegularExpressions

Module Example
   Public Sub Main()
      Dim filenames() As String= { "chapter1.txt", "chapter2.txt", 
                                   "chapter3.txt", "chapter4.txt",
                                   "chapter5.txt" }
      Dim pattern As String = "\b\w+\b"
      Dim tasks As New List(Of Task)()  
      Dim source As New CancellationTokenSource()
      Dim token As CancellationToken = source.Token
      Dim totalWords As Integer = 0
        
      ' Determine the number of words in each file.
      For Each filename In filenames
         tasks.Add( Task.Factory.StartNew( Sub(obj As Object)
                                              Dim fn As String = CStr(obj)
                                              token.ThrowIfCancellationRequested() 
                                              If Not File.Exists(fn) Then 
                                                 source.Cancel()
                                                 token.ThrowIfCancellationRequested()
                                              End If        
                                                   
                                              Dim sr As New StreamReader(fn.ToString())
                                              Dim content As String = sr.ReadToEnd()
                                              sr.Close()
                                              Dim words As Integer = Regex.Matches(content, pattern).Count
                                              Interlocked.Add(totalWords, words) 
                                              Console.WriteLine("{0,-25} {1,6:N0} words", fn, words) 
                                           End Sub, filename, token))
      Next
      
      Dim finalTask As Task = Task.Factory.ContinueWhenAll(tasks.ToArray(), 
                                                           Sub(wordCountTasks As Task())
                                                              If Not token.IsCancellationRequested Then 
                                                                 Console.WriteLine("\n{0,-25} {1,6} total words\n", 
                                                                                   String.Format("{0} files", wordCountTasks.Length), 
                                                                                   totalWords)
                                                              End If                      
                                                           End Sub, token) 
      Try                                                    
         finalTask.Wait()
      Catch ae As AggregateException 
         For Each inner In ae.InnerExceptions
            Console.WriteLine()
            If TypeOf inner Is TaskCanceledException
               Console.WriteLine("Failure to determine total word count: a task was cancelled.")
            Else
               Console.WriteLine("Failure caused by {0}", inner.GetType().Name)
            End If 
         Next           
      Finally
         source.Dispose()
      End Try                                                                     
   End Sub
End Module
' The example displays output like the following:
'       chapter2.txt               1,585 words
'       chapter1.txt               4,012 words
'       
'       Failure to determine total word count: a task was cancelled.

설명

이 메서드는 완료 상태에 관계 없이 @no__t 1 배열의 모든 작업이 완료 되 면 continuationAction 대리자를 실행 합니다.This method executes the continuationAction delegate when all tasks in the tasks array have completed, regardless of their completion status.

추가 정보

ContinueWhenAll(Task[], Action<Task[]>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task ^> ^> ^ continuationAction, System::Threading::Tasks::TaskContinuationOptions continuationOptions);
public System.Threading.Tasks.Task ContinueWhenAll (System.Threading.Tasks.Task[] tasks, Action<System.Threading.Tasks.Task[]> continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Action<System.Threading.Tasks.Task[]> * System.Threading.Tasks.TaskContinuationOptions -> System.Threading.Tasks.Task
Public Function ContinueWhenAll (tasks As Task(), continuationAction As Action(Of Task()), continuationOptions As TaskContinuationOptions) As Task

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

continuationOptions 인수에서 잘못된 값을 지정합니다.The continuationOptions argument specifies an invalid value.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll(Task[], Action<Task[]>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task ^> ^> ^ continuationAction, System::Threading::CancellationToken cancellationToken, System::Threading::Tasks::TaskContinuationOptions continuationOptions, System::Threading::Tasks::TaskScheduler ^ scheduler);
public System.Threading.Tasks.Task ContinueWhenAll (System.Threading.Tasks.Task[] tasks, Action<System.Threading.Tasks.Task[]> continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Action<System.Threading.Tasks.Task[]> * System.Threading.CancellationToken * System.Threading.Tasks.TaskContinuationOptions * System.Threading.Tasks.TaskScheduler -> System.Threading.Tasks.Task

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task.

scheduler
TaskScheduler

새 연속 작업을 예약하는 데 사용할 개체입니다.The object that is used to schedule the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

또는-or- scheduler 인수가 null인 경우The scheduler argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

continuationOptions가 잘못된 TaskContinuationOptions 값을 지정합니다.continuationOptions specifies an invalid TaskContinuationOptions value.

제공된 CancellationToken가 이미 삭제된 경우The provided CancellationToken has already been disposed.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^, TResult> ^ continuationFunction, System::Threading::CancellationToken cancellationToken, System::Threading::Tasks::TaskContinuationOptions continuationOptions, System::Threading::Tasks::TaskScheduler ^ scheduler);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TAntecedentResult,TResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Func<System.Threading.Tasks.Task<TAntecedentResult>[],TResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Func<System.Threading.Tasks.Task<'AntecedentResult>[], 'Result> * System.Threading.CancellationToken * System.Threading.Tasks.TaskContinuationOptions * System.Threading.Tasks.TaskScheduler -> System.Threading.Tasks.Task<'Result>

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task<TAntecedentResult>[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

scheduler
TaskScheduler

새 연속 작업을 예약하는 데 사용할 개체입니다.The object that is used to schedule the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

또는-or- scheduler 인수가 null인 경우The scheduler argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

continuationOptions 인수에서 잘못된 값을 지정합니다.The continuationOptions argument specifies an invalid value.

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

또는-or- cancellationToken을 만든 CancellationTokenSource가 이미 삭제되었습니다.The CancellationTokenSource that created cancellationToken has already been disposed.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^, TResult> ^ continuationFunction, System::Threading::Tasks::TaskContinuationOptions continuationOptions);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TAntecedentResult,TResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Func<System.Threading.Tasks.Task<TAntecedentResult>[],TResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Func<System.Threading.Tasks.Task<'AntecedentResult>[], 'Result> * System.Threading.Tasks.TaskContinuationOptions -> System.Threading.Tasks.Task<'Result>
Public Function ContinueWhenAll(Of TAntecedentResult, TResult) (tasks As Task(Of TAntecedentResult)(), continuationFunction As Func(Of Task(Of TAntecedentResult)(), TResult), continuationOptions As TaskContinuationOptions) As Task(Of TResult)

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task<TAntecedentResult>[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

continuationOptions 인수에서 잘못된 값을 지정합니다.The continuationOptions argument specifies an invalid value.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^, TResult> ^ continuationFunction, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TAntecedentResult,TResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Func<System.Threading.Tasks.Task<TAntecedentResult>[],TResult> continuationFunction, System.Threading.CancellationToken cancellationToken);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Func<System.Threading.Tasks.Task<'AntecedentResult>[], 'Result> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task<TAntecedentResult>[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

또는-or- cancellationToken을 만든 CancellationTokenSource가 이미 삭제되었습니다.The CancellationTokenSource that created cancellationToken has already been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

추가 정보

ContinueWhenAll<TAntecedentResult,TResult>(Task<TAntecedentResult>[], Func<Task<TAntecedentResult>[],TResult>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^, TResult> ^ continuationFunction);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TAntecedentResult,TResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Func<System.Threading.Tasks.Task<TAntecedentResult>[],TResult> continuationFunction);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Func<System.Threading.Tasks.Task<'AntecedentResult>[], 'Result> -> System.Threading.Tasks.Task<'Result>
Public Function ContinueWhenAll(Of TAntecedentResult, TResult) (tasks As Task(Of TAntecedentResult)(), continuationFunction As Func(Of Task(Of TAntecedentResult)(), TResult)) As Task(Of TResult)

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task<TAntecedentResult>[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

추가 정보

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult>
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^> ^ continuationAction, System::Threading::CancellationToken cancellationToken, System::Threading::Tasks::TaskContinuationOptions continuationOptions, System::Threading::Tasks::TaskScheduler ^ scheduler);
public System.Threading.Tasks.Task ContinueWhenAll<TAntecedentResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Action<System.Threading.Tasks.Task<TAntecedentResult>[]> continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Action<System.Threading.Tasks.Task<'AntecedentResult>[]> * System.Threading.CancellationToken * System.Threading.Tasks.TaskContinuationOptions * System.Threading.Tasks.TaskScheduler -> System.Threading.Tasks.Task

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task<TAntecedentResult>[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

scheduler
TaskScheduler

새 연속 작업을 예약하는 데 사용할 개체입니다.The object that is used to schedule the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

또는-or- scheduler 인수가 null인 경우The scheduler argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

continuationOptions가 잘못된 TaskContinuationOptions 값을 지정합니다.continuationOptions specifies an invalid TaskContinuationOptions value.

제공된 CancellationToken가 이미 삭제된 경우The provided CancellationToken has already been disposed.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult>
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^> ^ continuationAction, System::Threading::Tasks::TaskContinuationOptions continuationOptions);
public System.Threading.Tasks.Task ContinueWhenAll<TAntecedentResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Action<System.Threading.Tasks.Task<TAntecedentResult>[]> continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Action<System.Threading.Tasks.Task<'AntecedentResult>[]> * System.Threading.Tasks.TaskContinuationOptions -> System.Threading.Tasks.Task
Public Function ContinueWhenAll(Of TAntecedentResult) (tasks As Task(Of TAntecedentResult)(), continuationAction As Action(Of Task(Of TAntecedentResult)()), continuationOptions As TaskContinuationOptions) As Task

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task<TAntecedentResult>[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

continuationOptions 인수에서 잘못된 값을 지정합니다.The continuationOptions argument specifies an invalid value.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult>
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^> ^ continuationAction, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task ContinueWhenAll<TAntecedentResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Action<System.Threading.Tasks.Task<TAntecedentResult>[]> continuationAction, System.Threading.CancellationToken cancellationToken);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Action<System.Threading.Tasks.Task<'AntecedentResult>[]> * System.Threading.CancellationToken -> System.Threading.Tasks.Task

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task<TAntecedentResult>[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

또는-or- cancellationToken을 만든 CancellationTokenSource가 이미 삭제되었습니다.The CancellationTokenSource that created cancellationToken has already been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

추가 정보

ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[], Action<Task<TAntecedentResult>[]>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TAntecedentResult>
 System::Threading::Tasks::Task ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^ tasks, Action<cli::array <System::Threading::Tasks::Task<TAntecedentResult> ^> ^> ^ continuationAction);
public System.Threading.Tasks.Task ContinueWhenAll<TAntecedentResult> (System.Threading.Tasks.Task<TAntecedentResult>[] tasks, Action<System.Threading.Tasks.Task<TAntecedentResult>[]> continuationAction);
member this.ContinueWhenAll : System.Threading.Tasks.Task<'AntecedentResult>[] * Action<System.Threading.Tasks.Task<'AntecedentResult>[]> -> System.Threading.Tasks.Task
Public Function ContinueWhenAll(Of TAntecedentResult) (tasks As Task(Of TAntecedentResult)(), continuationAction As Action(Of Task(Of TAntecedentResult)())) As Task

형식 매개 변수

TAntecedentResult

선행 tasks의 결과 형식입니다.The type of the result of the antecedent tasks.

매개 변수

tasks
Task<TAntecedentResult>[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationAction
Action<Task<TAntecedentResult>[]>

tasks 배열의 모든 작업이 완료되었을 때 실행할 동작 대리자입니다.The action delegate to execute when all tasks in the tasks array have completed.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationAction 인수가 null인 경우The continuationAction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

추가 정보

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task ^> ^, TResult> ^ continuationFunction);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TResult> (System.Threading.Tasks.Task[] tasks, Func<System.Threading.Tasks.Task[],TResult> continuationFunction);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Func<System.Threading.Tasks.Task[], 'Result> -> System.Threading.Tasks.Task<'Result>
Public Function ContinueWhenAll(Of TResult) (tasks As Task(), continuationFunction As Func(Of Task(), TResult)) As Task(Of TResult)

형식 매개 변수

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

추가 정보

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>, CancellationToken)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task ^> ^, TResult> ^ continuationFunction, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TResult> (System.Threading.Tasks.Task[] tasks, Func<System.Threading.Tasks.Task[],TResult> continuationFunction, System.Threading.CancellationToken cancellationToken);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Func<System.Threading.Tasks.Task[], 'Result> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>

형식 매개 변수

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

또는-or- cancellationToken을 만든 CancellationTokenSource가 이미 삭제되었습니다.The CancellationTokenSource that created cancellationToken has already been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

추가 정보

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>, TaskContinuationOptions)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task ^> ^, TResult> ^ continuationFunction, System::Threading::Tasks::TaskContinuationOptions continuationOptions);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TResult> (System.Threading.Tasks.Task[] tasks, Func<System.Threading.Tasks.Task[],TResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Func<System.Threading.Tasks.Task[], 'Result> * System.Threading.Tasks.TaskContinuationOptions -> System.Threading.Tasks.Task<'Result>
Public Function ContinueWhenAll(Of TResult) (tasks As Task(), continuationFunction As Func(Of Task(), TResult), continuationOptions As TaskContinuationOptions) As Task(Of TResult)

형식 매개 변수

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열에 있는 요소 하나가 삭제되었습니다.An element in the tasks array has been disposed.

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

continuationOptions 인수에서 잘못된 값을 지정합니다.The continuationOptions argument specifies an invalid value.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

ContinueWhenAll<TResult>(Task[], Func<Task[],TResult>, CancellationToken, TaskContinuationOptions, TaskScheduler)

지정된 일련의 작업을 완료하면 시작되는 연속 작업을 만듭니다.Creates a continuation task that starts when a set of specified tasks has completed.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ ContinueWhenAll(cli::array <System::Threading::Tasks::Task ^> ^ tasks, Func<cli::array <System::Threading::Tasks::Task ^> ^, TResult> ^ continuationFunction, System::Threading::CancellationToken cancellationToken, System::Threading::Tasks::TaskContinuationOptions continuationOptions, System::Threading::Tasks::TaskScheduler ^ scheduler);
public System.Threading.Tasks.Task<TResult> ContinueWhenAll<TResult> (System.Threading.Tasks.Task[] tasks, Func<System.Threading.Tasks.Task[],TResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler);
member this.ContinueWhenAll : System.Threading.Tasks.Task[] * Func<System.Threading.Tasks.Task[], 'Result> * System.Threading.CancellationToken * System.Threading.Tasks.TaskContinuationOptions * System.Threading.Tasks.TaskScheduler -> System.Threading.Tasks.Task<'Result>

형식 매개 변수

TResult

continuationFunction 대리자가 반환하고 만들어진 작업과 연결되는 결과의 형식입니다.The type of the result that is returned by the continuationFunction delegate and associated with the created task.

매개 변수

tasks
Task[]

계속할 작업의 배열입니다.The array of tasks from which to continue.

continuationFunction
Func<Task[],TResult>

tasks 배열의 모든 작업이 완료되었을 때 비동기로 실행할 함수 대리자입니다.The function delegate to execute asynchronously when all tasks in the tasks array have completed.

cancellationToken
CancellationToken

새 연속 작업에 할당할 취소 토큰입니다.The cancellation token to assign to the new continuation task.

continuationOptions
TaskContinuationOptions

새 연속 작업 동작을 제어하는 열거형 값의 비트 조합입니다.A bitwise combination of the enumeration values that control the behavior of the new continuation task. NotOn* 및 OnlyOn* 멤버는 지원되지 않습니다.The NotOn* and OnlyOn* members are not supported.

scheduler
TaskScheduler

새 연속 작업을 예약하는 데 사용할 개체입니다.The object that is used to schedule the new continuation task.

반환

새 연속 작업입니다.The new continuation task.

예외

tasks 배열이 null인 경우The tasks array is null.

또는-or- continuationFunction 인수가 null인 경우The continuationFunction argument is null.

또는-or- scheduler 인수가 null인 경우The scheduler argument is null.

tasks 배열에 null 값이 있거나 비어 있습니다.The tasks array is empty or contains a null value.

continuationOptions가 잘못된 TaskContinuationOptions 값을 지정합니다.continuationOptions specifies an invalid TaskContinuationOptions value.

제공된 CancellationToken가 이미 삭제된 경우The provided CancellationToken has already been disposed.

설명

연속 작업이 실행 될 TaskStatus 상태를 제한 하는 NotOn @ no__t-0 및 전용 @ no__t-1 TaskContinuationOptionsContinueWhenAll에서 사용할 수 없습니다.The NotOn* and OnlyOn* TaskContinuationOptions, which constrain for which TaskStatus states a continuation will be executed, are illegal with ContinueWhenAll.

추가 정보

적용 대상