共用方式為


AsyncOperationCompletedHandler<TResult> 代理人

定義

表示處理非同步作業已完成事件的方法。

/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(4242337836, 58840, 17528, 145, 90, 77, 144, 183, 75, 131, 165)]
template <typename TResult>
class AsyncOperationCompletedHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.Guid(4242337836, 58840, 17528, 145, 90, 77, 144, 183, 75, 131, 165)]
public delegate void AsyncOperationCompletedHandler<TResult>(IAsyncOperation<TResult> asyncInfo, AsyncStatus asyncStatus);
Public Delegate Sub AsyncOperationCompletedHandler(Of TResult)(asyncInfo As IAsyncOperation(Of TResult), asyncStatus As AsyncStatus)

類型參數

TResult

參數

asyncInfo
IAsyncOperation<TResult>

非同步作業。

asyncStatus
AsyncStatus

其中一個列舉值。

屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.FoundationContract (已於 v1.0 引進)

範例

如需說明如何處理Completed事件的C++/WinRT程式碼範例,請參閱非同步動作和作業的委派類型

適用於