TaskFactory.FromAsync 메서드

정의

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

오버로드

FromAsync(IAsyncResult, Action<IAsyncResult>)

지정된 Task가 완료될 때 End 메서드 작업을 실행하는 IAsyncResult를 만듭니다.Creates a Task that executes an end method action when a specified IAsyncResult completes.

FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync(IAsyncResult, Action<IAsyncResult>, TaskCreationOptions)

지정된 Task가 완료될 때 End 메서드 작업을 실행하는 IAsyncResult를 만듭니다.Creates a Task that executes an end method action when a specified IAsyncResult completes.

FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync(IAsyncResult, Action<IAsyncResult>, TaskCreationOptions, TaskScheduler)

지정된 Task가 완료될 때 End 메서드 작업을 실행하는 IAsyncResult를 만듭니다.Creates a Task that executes an end method action when a specified IAsyncResult completes.

FromAsync<TArg1,TArg2,TArg3,TResult>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, TArg3, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2,TArg3,TResult>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, TArg3, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2,TArg3>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, TArg3, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2,TArg3>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, TArg3, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2,TResult>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2,TResult>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TArg2>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TResult>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1,TResult>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TArg1>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TResult>(IAsyncResult, Func<IAsyncResult,TResult>, TaskCreationOptions, TaskScheduler)

지정된 Task<TResult>가 완료될 때 End 메서드 함수를 실행하는 IAsyncResult를 만듭니다.Creates a Task<TResult> that executes an end method function when a specified IAsyncResult completes.

FromAsync<TResult>(IAsyncResult, Func<IAsyncResult,TResult>, TaskCreationOptions)

지정된 Task<TResult>가 완료될 때 End 메서드 함수를 실행하는 IAsyncResult를 만듭니다.Creates a Task<TResult> that executes an end method function when a specified IAsyncResult completes.

FromAsync<TResult>(Func<AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync<TResult>(IAsyncResult, Func<IAsyncResult,TResult>)

지정된 Task<TResult>가 완료될 때 End 메서드 함수를 실행하는 IAsyncResult를 만듭니다.Creates a Task<TResult> that executes an end method function when a specified IAsyncResult completes.

FromAsync<TResult>(Func<AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

FromAsync(IAsyncResult, Action<IAsyncResult>)

지정된 Task가 완료될 때 End 메서드 작업을 실행하는 IAsyncResult를 만듭니다.Creates a Task that executes an end method action when a specified IAsyncResult completes.

public:
 System::Threading::Tasks::Task ^ FromAsync(IAsyncResult ^ asyncResult, Action<IAsyncResult ^> ^ endMethod);
public System.Threading.Tasks.Task FromAsync (IAsyncResult asyncResult, Action<IAsyncResult> endMethod);
member this.FromAsync : IAsyncResult * Action<IAsyncResult> -> System.Threading.Tasks.Task
Public Function FromAsync (asyncResult As IAsyncResult, endMethod As Action(Of IAsyncResult)) As Task

매개 변수

asyncResult
IAsyncResult

완료될 때 endMethod의 처리를 트리거하는 IAsyncResult입니다.The IAsyncResult whose completion should trigger the processing of the endMethod.

endMethod
Action<IAsyncResult>

완료된 asyncResult를 처리하는 동작 대리자입니다.The action delegate that processes the completed asyncResult.

반환

비동기 작업을 나타내는 Task입니다.A Task that represents the asynchronous operation.

예외

asyncResultnull입니다.asyncResult is null.

또는-or- endMethodnull입니다.endMethod is null.

설명

FromAsync 사용 하는 오버 로드는 asyncResult 매개 변수 오버 로드 만큼 효율적이 지 않습니다.를 beginMethod 매개 변수입니다.The FromAsync overloads that take an asyncResult parameter are not as efficient as the overloads that take a beginMethod parameter. 성능이 문제일 경우 제공 하는 오버 로드를 사용 합니다 beginMethod / endMethod 패턴입니다.If performance is an issue, use the overloads that provide the beginMethod/endMethod pattern.

추가 정보

FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
 System::Threading::Tasks::Task ^ FromAsync(Func<AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, System::Object ^ state);
public System.Threading.Tasks.Task FromAsync (Func<AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, object state);
member this.FromAsync : Func<AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * obj -> System.Threading.Tasks.Task
Public Function FromAsync (beginMethod As Func(Of AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), state As Object) As Task

매개 변수

beginMethod
Func<AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync(IAsyncResult, Action<IAsyncResult>, TaskCreationOptions)

지정된 Task가 완료될 때 End 메서드 작업을 실행하는 IAsyncResult를 만듭니다.Creates a Task that executes an end method action when a specified IAsyncResult completes.

public:
 System::Threading::Tasks::Task ^ FromAsync(IAsyncResult ^ asyncResult, Action<IAsyncResult ^> ^ endMethod, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task FromAsync (IAsyncResult asyncResult, Action<IAsyncResult> endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : IAsyncResult * Action<IAsyncResult> * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task
Public Function FromAsync (asyncResult As IAsyncResult, endMethod As Action(Of IAsyncResult), creationOptions As TaskCreationOptions) As Task

매개 변수

asyncResult
IAsyncResult

완료될 때 endMethod의 처리를 트리거하는 IAsyncResult입니다.The IAsyncResult whose completion should trigger the processing of the endMethod.

endMethod
Action<IAsyncResult>

완료된 asyncResult를 처리하는 동작 대리자입니다.The action delegate that processes the completed asyncResult.

creationOptions
TaskCreationOptions

만들어진 Task의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task.

반환

비동기 작업을 나타내는 Task입니다.A Task that represents the asynchronous operation.

예외

asyncResultnull입니다.asyncResult is null.

또는-or- endMethodnull입니다.endMethod is null.

paramref name="creationOptions" />는 잘못된 TaskCreationOptions 값을 지정합니다.paramref name="creationOptions" /> specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

FromAsync 사용 하는 오버 로드는 asyncResult 매개 변수 오버 로드 만큼 효율적이 지 않습니다.를 beginMethod 매개 변수입니다.The FromAsync overloads that take an asyncResult parameter are not as efficient as the overloads that take a beginMethod parameter. 성능이 문제일 경우 제공 하는 오버 로드를 사용 합니다 beginMethod / endMethod 패턴입니다.If performance is an issue, use the overloads that provide the beginMethod/endMethod pattern.

추가 정보

FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
 System::Threading::Tasks::Task ^ FromAsync(Func<AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task FromAsync (Func<AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task
Public Function FromAsync (beginMethod As Func(Of AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), state As Object, creationOptions As TaskCreationOptions) As Task

매개 변수

beginMethod
Func<AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

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

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod. TaskCreationOptionsPreferFairness, LongRunningAttachedToParent 는 모두 함께 사용할 수 없습니다.The TaskCreationOptions values PreferFairness, LongRunning and AttachedToParent are all mutually exclusive. FromAsync 메서드에서 중 하나 LongRunning 또는 AttachedToParent 자체적으로 하면는 ArgumentOutOfRangeException throw 됩니다.In the FromAsync methods, either LongRunning or AttachedToParent by themselves will cause an ArgumentOutOfRangeException to be thrown.

추가 정보

FromAsync(IAsyncResult, Action<IAsyncResult>, TaskCreationOptions, TaskScheduler)

지정된 Task가 완료될 때 End 메서드 작업을 실행하는 IAsyncResult를 만듭니다.Creates a Task that executes an end method action when a specified IAsyncResult completes.

public:
 System::Threading::Tasks::Task ^ FromAsync(IAsyncResult ^ asyncResult, Action<IAsyncResult ^> ^ endMethod, System::Threading::Tasks::TaskCreationOptions creationOptions, System::Threading::Tasks::TaskScheduler ^ scheduler);
public System.Threading.Tasks.Task FromAsync (IAsyncResult asyncResult, Action<IAsyncResult> endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler);
member this.FromAsync : IAsyncResult * Action<IAsyncResult> * System.Threading.Tasks.TaskCreationOptions * System.Threading.Tasks.TaskScheduler -> System.Threading.Tasks.Task
Public Function FromAsync (asyncResult As IAsyncResult, endMethod As Action(Of IAsyncResult), creationOptions As TaskCreationOptions, scheduler As TaskScheduler) As Task

매개 변수

asyncResult
IAsyncResult

완료될 때 endMethod의 처리를 트리거하는 IAsyncResult입니다.The IAsyncResult whose completion should trigger the processing of the endMethod.

endMethod
Action<IAsyncResult>

완료된 asyncResult를 처리하는 동작 대리자입니다.The action delegate that processes the completed asyncResult.

creationOptions
TaskCreationOptions

만들어진 Task의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task.

scheduler
TaskScheduler

End 메서드를 실행하는 작업을 예약하는 데 사용할 TaskScheduler입니다.The TaskScheduler that is used to schedule the task that executes the end method.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

asyncResultnull인 경우asyncResult is null.

또는-or- endMethodnull인 경우endMethod is null.

또는-or- schedulernull입니다.scheduler is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

FromAsync 사용 하는 오버 로드는 asyncResult 매개 변수 오버 로드 만큼 효율적이 지 않습니다.를 beginMethod 매개 변수입니다.The FromAsync overloads that take an asyncResult parameter are not as efficient as the overloads that take a beginMethod parameter. 성능이 문제일 경우 제공 하는 오버 로드를 사용 합니다 beginMethod / endMethod 패턴입니다.If performance is an issue, use the overloads that provide the beginMethod/endMethod pattern.

추가 정보

FromAsync<TArg1,TArg2,TArg3,TResult>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, TArg3, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2, typename TArg3, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<TArg1, TArg2, TArg3, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task<TResult> FromAsync<TArg1,TArg2,TArg3,TResult> (Func<TArg1,TArg2,TArg3,AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<'TArg1, 'TArg2, 'TArg3, AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * 'TArg1 * 'TArg2 * 'TArg3 * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TArg1, TArg2, TArg3, TResult) (beginMethod As Func(Of TArg1, TArg2, TArg3, AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), arg1 As TArg1, arg2 As TArg2, arg3 As TArg3, state As Object, creationOptions As TaskCreationOptions) As Task(Of TResult)

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 세 번째 인수의 형식입니다.The type of the third argument passed to beginMethod delegate.

TArg3

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

arg3
TArg3

beginMethod 대리자에 전달되는 세 번째 인수입니다.The third argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task<TResult>의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task<TResult>.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull입니다.endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2,TArg3,TResult>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, TArg3, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2, typename TArg3, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<TArg1, TArg2, TArg3, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, System::Object ^ state);
public System.Threading.Tasks.Task<TResult> FromAsync<TArg1,TArg2,TArg3,TResult> (Func<TArg1,TArg2,TArg3,AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state);
member this.FromAsync : Func<'TArg1, 'TArg2, 'TArg3, AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * 'TArg1 * 'TArg2 * 'TArg3 * obj -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TArg1, TArg2, TArg3, TResult) (beginMethod As Func(Of TArg1, TArg2, TArg3, AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), arg1 As TArg1, arg2 As TArg2, arg3 As TArg3, state As Object) As Task(Of TResult)

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 세 번째 인수의 형식입니다.The type of the third argument passed to beginMethod delegate.

TArg3

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

arg3
TArg3

beginMethod 대리자에 전달되는 세 번째 인수입니다.The third argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2,TArg3>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, TArg3, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2, typename TArg3>
 System::Threading::Tasks::Task ^ FromAsync(Func<TArg1, TArg2, TArg3, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task FromAsync<TArg1,TArg2,TArg3> (Func<TArg1,TArg2,TArg3,AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<'TArg1, 'TArg2, 'TArg3, AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * 'TArg1 * 'TArg2 * 'TArg3 * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task
Public Function FromAsync(Of TArg1, TArg2, TArg3) (beginMethod As Func(Of TArg1, TArg2, TArg3, AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), arg1 As TArg1, arg2 As TArg2, arg3 As TArg3, state As Object, creationOptions As TaskCreationOptions) As Task

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 세 번째 인수의 형식입니다.The type of the third argument passed to beginMethod delegate.

TArg3

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

매개 변수

beginMethod
Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

arg3
TArg3

beginMethod 대리자에 전달되는 세 번째 인수입니다.The third argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull입니다.endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2,TArg3>(Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, TArg3, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2, typename TArg3>
 System::Threading::Tasks::Task ^ FromAsync(Func<TArg1, TArg2, TArg3, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, System::Object ^ state);
public System.Threading.Tasks.Task FromAsync<TArg1,TArg2,TArg3> (Func<TArg1,TArg2,TArg3,AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state);
member this.FromAsync : Func<'TArg1, 'TArg2, 'TArg3, AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * 'TArg1 * 'TArg2 * 'TArg3 * obj -> System.Threading.Tasks.Task
Public Function FromAsync(Of TArg1, TArg2, TArg3) (beginMethod As Func(Of TArg1, TArg2, TArg3, AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), arg1 As TArg1, arg2 As TArg2, arg3 As TArg3, state As Object) As Task

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 세 번째 인수의 형식입니다.The type of the third argument passed to beginMethod delegate.

TArg3

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

매개 변수

beginMethod
Func<TArg1,TArg2,TArg3,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

arg3
TArg3

beginMethod 대리자에 전달되는 세 번째 인수입니다.The third argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2,TResult>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<TArg1, TArg2, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, TArg1 arg1, TArg2 arg2, System::Object ^ state);
public System.Threading.Tasks.Task<TResult> FromAsync<TArg1,TArg2,TResult> (Func<TArg1,TArg2,AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, TArg1 arg1, TArg2 arg2, object state);
member this.FromAsync : Func<'TArg1, 'TArg2, AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * 'TArg1 * 'TArg2 * obj -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TArg1, TArg2, TResult) (beginMethod As Func(Of TArg1, TArg2, AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), arg1 As TArg1, arg2 As TArg2, state As Object) As Task(Of TResult)

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull입니다.endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2,TResult>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, TArg2, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<TArg1, TArg2, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, TArg1 arg1, TArg2 arg2, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task<TResult> FromAsync<TArg1,TArg2,TResult> (Func<TArg1,TArg2,AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, TArg1 arg1, TArg2 arg2, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<'TArg1, 'TArg2, AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * 'TArg1 * 'TArg2 * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TArg1, TArg2, TResult) (beginMethod As Func(Of TArg1, TArg2, AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), arg1 As TArg1, arg2 As TArg2, state As Object, creationOptions As TaskCreationOptions) As Task(Of TResult)

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task<TResult>의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task<TResult>.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull입니다.endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2>
 System::Threading::Tasks::Task ^ FromAsync(Func<TArg1, TArg2, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, TArg1 arg1, TArg2 arg2, System::Object ^ state);
public System.Threading.Tasks.Task FromAsync<TArg1,TArg2> (Func<TArg1,TArg2,AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, TArg2 arg2, object state);
member this.FromAsync : Func<'TArg1, 'TArg2, AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * 'TArg1 * 'TArg2 * obj -> System.Threading.Tasks.Task
Public Function FromAsync(Of TArg1, TArg2) (beginMethod As Func(Of TArg1, TArg2, AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), arg1 As TArg1, arg2 As TArg2, state As Object) As Task

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

매개 변수

beginMethod
Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TArg2>(Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, TArg2, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TArg2>
 System::Threading::Tasks::Task ^ FromAsync(Func<TArg1, TArg2, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, TArg1 arg1, TArg2 arg2, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task FromAsync<TArg1,TArg2> (Func<TArg1,TArg2,AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, TArg2 arg2, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<'TArg1, 'TArg2, AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * 'TArg1 * 'TArg2 * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task
Public Function FromAsync(Of TArg1, TArg2) (beginMethod As Func(Of TArg1, TArg2, AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), arg1 As TArg1, arg2 As TArg2, state As Object, creationOptions As TaskCreationOptions) As Task

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 두 번째 인수의 형식입니다.The type of the second argument passed to beginMethod delegate.

TArg2

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

매개 변수

beginMethod
Func<TArg1,TArg2,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

arg2
TArg2

beginMethod 대리자에 전달되는 두 번째 인수입니다.The second argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TResult>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<TArg1, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, TArg1 arg1, System::Object ^ state);
public System.Threading.Tasks.Task<TResult> FromAsync<TArg1,TResult> (Func<TArg1,AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, TArg1 arg1, object state);
member this.FromAsync : Func<'TArg1, AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * 'TArg1 * obj -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TArg1, TResult) (beginMethod As Func(Of TArg1, AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), arg1 As TArg1, state As Object) As Task(Of TResult)

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<TArg1,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull입니다.endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1,TResult>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, TArg1, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1, typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<TArg1, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, TArg1 arg1, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task<TResult> FromAsync<TArg1,TResult> (Func<TArg1,AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, TArg1 arg1, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<'TArg1, AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * 'TArg1 * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TArg1, TResult) (beginMethod As Func(Of TArg1, AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), arg1 As TArg1, state As Object, creationOptions As TaskCreationOptions) As Task(Of TResult)

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<TArg1,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task<TResult>의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task<TResult>.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1>
 System::Threading::Tasks::Task ^ FromAsync(Func<TArg1, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, TArg1 arg1, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task FromAsync<TArg1> (Func<TArg1,AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<'TArg1, AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * 'TArg1 * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task
Public Function FromAsync(Of TArg1) (beginMethod As Func(Of TArg1, AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), arg1 As TArg1, state As Object, creationOptions As TaskCreationOptions) As Task

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

매개 변수

beginMethod
Func<TArg1,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TArg1>(Func<TArg1,AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, TArg1, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task를 만듭니다.Creates a Task that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TArg1>
 System::Threading::Tasks::Task ^ FromAsync(Func<TArg1, AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Action<IAsyncResult ^> ^ endMethod, TArg1 arg1, System::Object ^ state);
public System.Threading.Tasks.Task FromAsync<TArg1> (Func<TArg1,AsyncCallback,object,IAsyncResult> beginMethod, Action<IAsyncResult> endMethod, TArg1 arg1, object state);
member this.FromAsync : Func<'TArg1, AsyncCallback, obj, IAsyncResult> * Action<IAsyncResult> * 'TArg1 * obj -> System.Threading.Tasks.Task
Public Function FromAsync(Of TArg1) (beginMethod As Func(Of TArg1, AsyncCallback, Object, IAsyncResult), endMethod As Action(Of IAsyncResult), arg1 As TArg1, state As Object) As Task

형식 매개 변수

TArg1

beginMethod 대리자에 전달되는 첫 번째 인수의 형식입니다.The type of the first argument passed to the beginMethod delegate.

매개 변수

beginMethod
Func<TArg1,AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Action<IAsyncResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

arg1
TArg1

beginMethod 대리자에 전달되는 첫 번째 인수입니다.The first argument passed to the beginMethod delegate.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task입니다.The created Task that represents the asynchronous operation.

예외

beginMethodnull인 경우beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

설명

합니다 beginMethod 대리자 스레드에서 시작 되는 FromAsync 에서 실행 되 고 있습니다.The beginMethod delegate is started on the thread that FromAsync is running on. 이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TResult>(IAsyncResult, Func<IAsyncResult,TResult>, TaskCreationOptions, TaskScheduler)

지정된 Task<TResult>가 완료될 때 End 메서드 함수를 실행하는 IAsyncResult를 만듭니다.Creates a Task<TResult> that executes an end method function when a specified IAsyncResult completes.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(IAsyncResult ^ asyncResult, Func<IAsyncResult ^, TResult> ^ endMethod, System::Threading::Tasks::TaskCreationOptions creationOptions, System::Threading::Tasks::TaskScheduler ^ scheduler);
public System.Threading.Tasks.Task<TResult> FromAsync<TResult> (IAsyncResult asyncResult, Func<IAsyncResult,TResult> endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler);
member this.FromAsync : IAsyncResult * Func<IAsyncResult, 'Result> * System.Threading.Tasks.TaskCreationOptions * System.Threading.Tasks.TaskScheduler -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TResult) (asyncResult As IAsyncResult, endMethod As Func(Of IAsyncResult, TResult), creationOptions As TaskCreationOptions, scheduler As TaskScheduler) As Task(Of TResult)

형식 매개 변수

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

asyncResult
IAsyncResult

완료될 때 endMethod의 처리를 트리거하는 IAsyncResult입니다.The IAsyncResult whose completion should trigger the processing of the endMethod.

endMethod
Func<IAsyncResult,TResult>

완료된 asyncResult를 처리하는 함수 대리자입니다.The function delegate that processes the completed asyncResult.

creationOptions
TaskCreationOptions

만들어진 Task<TResult>의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task<TResult>.

scheduler
TaskScheduler

End 메서드를 실행하는 작업을 예약하는 데 사용할 TaskScheduler입니다.The TaskScheduler that is used to schedule the task that executes the end method.

반환

비동기 작업을 나타내는 Task<TResult>입니다.A Task<TResult> that represents the asynchronous operation.

예외

asyncResultnull입니다.asyncResult is null.

또는-or-

endMethodnull인 경우endMethod is null.

또는-or- schedulernull인 경우scheduler is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

FromAsync 사용 하는 오버 로드는 asyncResult 매개 변수 오버 로드 만큼 효율적이 지 않습니다.를 beginMethod 매개 변수입니다.The FromAsync overloads that take an asyncResult parameter are not as efficient as the overloads that take a beginMethod parameter. 성능이 문제일 경우 제공 하는 오버 로드를 사용 합니다 beginMethod / endMethod 패턴입니다.If performance is an issue, use the overloads that provide the beginMethod/endMethod pattern.

추가 정보

FromAsync<TResult>(IAsyncResult, Func<IAsyncResult,TResult>, TaskCreationOptions)

지정된 Task<TResult>가 완료될 때 End 메서드 함수를 실행하는 IAsyncResult를 만듭니다.Creates a Task<TResult> that executes an end method function when a specified IAsyncResult completes.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(IAsyncResult ^ asyncResult, Func<IAsyncResult ^, TResult> ^ endMethod, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task<TResult> FromAsync<TResult> (IAsyncResult asyncResult, Func<IAsyncResult,TResult> endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : IAsyncResult * Func<IAsyncResult, 'Result> * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TResult) (asyncResult As IAsyncResult, endMethod As Func(Of IAsyncResult, TResult), creationOptions As TaskCreationOptions) As Task(Of TResult)

형식 매개 변수

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

asyncResult
IAsyncResult

완료될 때 endMethod의 처리를 트리거하는 IAsyncResult입니다.The IAsyncResult whose completion should trigger the processing of the endMethod.

endMethod
Func<IAsyncResult,TResult>

완료된 asyncResult를 처리하는 함수 대리자입니다.The function delegate that processes the completed asyncResult.

creationOptions
TaskCreationOptions

만들어진 Task<TResult>의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task<TResult>.

반환

비동기 작업을 나타내는 Task<TResult>입니다.A Task<TResult> that represents the asynchronous operation.

예외

asyncResultnull인 경우asyncResult is null.

또는-or- endMethodnull인 경우endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

FromAsync 사용 하는 오버 로드는 asyncResult 매개 변수 오버 로드 만큼 효율적이 지 않습니다.를 beginMethod 매개 변수입니다.The FromAsync overloads that take an asyncResult parameter are not as efficient as the overloads that take a beginMethod parameter. 성능이 문제일 경우 제공 하는 오버 로드를 사용 합니다 beginMethod / endMethod 패턴입니다.If performance is an issue, use the overloads that provide the beginMethod/endMethod pattern.

추가 정보

FromAsync<TResult>(Func<AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, Object)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, System::Object ^ state);
public System.Threading.Tasks.Task<TResult> FromAsync<TResult> (Func<AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, object state);
member this.FromAsync : Func<AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * obj -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TResult) (beginMethod As Func(Of AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), state As Object) As Task(Of TResult)

형식 매개 변수

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull인 경우endMethod is null.

설명

이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

FromAsync<TResult>(IAsyncResult, Func<IAsyncResult,TResult>)

지정된 Task<TResult>가 완료될 때 End 메서드 함수를 실행하는 IAsyncResult를 만듭니다.Creates a Task<TResult> that executes an end method function when a specified IAsyncResult completes.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(IAsyncResult ^ asyncResult, Func<IAsyncResult ^, TResult> ^ endMethod);
public System.Threading.Tasks.Task<TResult> FromAsync<TResult> (IAsyncResult asyncResult, Func<IAsyncResult,TResult> endMethod);
member this.FromAsync : IAsyncResult * Func<IAsyncResult, 'Result> -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TResult) (asyncResult As IAsyncResult, endMethod As Func(Of IAsyncResult, TResult)) As Task(Of TResult)

형식 매개 변수

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

asyncResult
IAsyncResult

완료될 때 endMethod의 처리를 트리거하는 IAsyncResult입니다.The IAsyncResult whose completion should trigger the processing of the endMethod.

endMethod
Func<IAsyncResult,TResult>

완료된 asyncResult를 처리하는 함수 대리자입니다.The function delegate that processes the completed asyncResult.

반환

비동기 작업을 나타내는 Task<TResult>입니다.A Task<TResult> that represents the asynchronous operation.

예외

asyncResultnull입니다.asyncResult is null.

또는-or- endMethodnull입니다.endMethod is null.

설명

FromAsync 사용 하는 오버 로드는 asyncResult 매개 변수 오버 로드 만큼 효율적이 지 않습니다.를 beginMethod 매개 변수입니다.The FromAsync overloads that take an asyncResult parameter are not as efficient as the overloads that take a beginMethod parameter. 성능이 문제일 경우 제공 하는 오버 로드를 사용 합니다 beginMethod / endMethod 패턴입니다.If performance is an issue, use the overloads that provide the beginMethod/endMethod pattern.

추가 정보

FromAsync<TResult>(Func<AsyncCallback,Object,IAsyncResult>, Func<IAsyncResult,TResult>, Object, TaskCreationOptions)

비동기 프로그래밍 모델 패턴을 따르는 Begin 및 End 메서드 쌍을 나타내는 Task<TResult>를 만듭니다.Creates a Task<TResult> that represents a pair of begin and end methods that conform to the Asynchronous Programming Model pattern.

public:
generic <typename TResult>
 System::Threading::Tasks::Task<TResult> ^ FromAsync(Func<AsyncCallback ^, System::Object ^, IAsyncResult ^> ^ beginMethod, Func<IAsyncResult ^, TResult> ^ endMethod, System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public System.Threading.Tasks.Task<TResult> FromAsync<TResult> (Func<AsyncCallback,object,IAsyncResult> beginMethod, Func<IAsyncResult,TResult> endMethod, object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
member this.FromAsync : Func<AsyncCallback, obj, IAsyncResult> * Func<IAsyncResult, 'Result> * obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.Task<'Result>
Public Function FromAsync(Of TResult) (beginMethod As Func(Of AsyncCallback, Object, IAsyncResult), endMethod As Func(Of IAsyncResult, TResult), state As Object, creationOptions As TaskCreationOptions) As Task(Of TResult)

형식 매개 변수

TResult

Task<TResult>를 통해 사용할 수 있는 결과의 형식입니다.The type of the result available through the Task<TResult>.

매개 변수

beginMethod
Func<AsyncCallback,Object,IAsyncResult>

비동기 작업을 시작하는 대리자입니다.The delegate that begins the asynchronous operation.

endMethod
Func<IAsyncResult,TResult>

비동기 작업을 종료하는 대리자입니다.The delegate that ends the asynchronous operation.

state
Object

beginMethod 대리자가 사용할 데이터가 포함된 개체입니다.An object containing data to be used by the beginMethod delegate.

creationOptions
TaskCreationOptions

만들어진 Task<TResult>의 동작을 제어하는 TaskCreationOptions 값입니다.The TaskCreationOptions value that controls the behavior of the created Task<TResult>.

반환

비동기 작업을 나타내는 만들어진 Task<TResult>입니다.The created Task<TResult> that represents the asynchronous operation.

예외

beginMethodnull입니다.beginMethod is null.

또는-or- endMethodnull입니다.endMethod is null.

creationOptions가 잘못된 TaskCreationOptions 값을 지정합니다.creationOptions specifies an invalid TaskCreationOptions value. 자세한 내용은 FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)에 대한 설명을 참조하십시오.For more information, see the Remarks for FromAsync(Func<AsyncCallback,Object,IAsyncResult>, Action<IAsyncResult>, Object, TaskCreationOptions)

설명

이 메서드에 의해 throw 된 예외 throw를 beginMethod입니다.This method throws any exceptions thrown by the beginMethod.

추가 정보

적용 대상