TplExtensions::ToApm Method (Task^, AsyncCallback^, Object^)
Visual Studio 2015
Converts a TPL task to the Asynchronous Programming Model (APM) Begin-End pattern.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
public: [ExtensionAttribute] static Task^ ToApm( Task^ task, AsyncCallback^ callback, Object^ state )
Parameters
- task
-
Type:
System.Threading.Tasks::Task^
The task that came from the asynchronous method.
- callback
-
Type:
System::AsyncCallback^
The optional callback to invoke when the task is completed.
- state
-
Type:
System::Object^
The state object provided by the caller of the Begin method.
Return Value
Type: System.Threading.Tasks::Task^A Task<TResult> (that implements IAsyncResult that should be returned from the Begin method.
Show: