BackgroundTaskCanceledEventHandler 委托

定义

表示处理后台任务取消的方法。

public delegate void BackgroundTaskCanceledEventHandler(IBackgroundTaskInstance ^ sender, BackgroundTaskCancellationReason reason);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2797910720, 20984, 19543, 172, 63, 21, 109, 209, 104, 12, 79)]
class BackgroundTaskCanceledEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(2797910720, 20984, 19543, 172, 63, 21, 109, 209, 104, 12, 79)]
public delegate void BackgroundTaskCanceledEventHandler(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason);
var backgroundTaskCanceledEventHandlerHandler = function(sender, reason){
/* Your code */
}
Public Delegate Sub BackgroundTaskCanceledEventHandler(sender As IBackgroundTaskInstance, reason As BackgroundTaskCancellationReason)

参数

sender
IBackgroundTaskInstance

已取消的后台任务实例。

reason
BackgroundTaskCancellationReason

取消后台任务实例的原因。

属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

适用于