TplExtensions::ToApm Method (Task^, AsyncCallback^, Object^)

 

Converts a TPL task to the Asynchronous Programming Model (APM) Begin-End pattern.

Namespace:   Microsoft.VisualStudio.Threading
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.

Return to top
Show: