PushNotificationReceivedEventArgs.Canceled 事件

定义

当系统要取消启动的后台任务以处理 PushReceived 事件时引发。

public:
 virtual event BackgroundTaskCanceledEventHandler ^ Canceled;
// Register
event_token Canceled(BackgroundTaskCanceledEventHandler const& handler) const;

// Revoke with event_token
void Canceled(event_token const* cookie) const;

// Revoke with event_revoker
PushNotificationReceivedEventArgs::Canceled_revoker Canceled(auto_revoke_t, BackgroundTaskCanceledEventHandler const& handler) const;
public event BackgroundTaskCanceledEventHandler Canceled;
function onCanceled(eventArgs) { /* Your code */ }
pushNotificationReceivedEventArgs.addEventListener("canceled", onCanceled);
pushNotificationReceivedEventArgs.removeEventListener("canceled", onCanceled);
- or -
pushNotificationReceivedEventArgs.oncanceled = onCanceled;
Public Custom Event Canceled As BackgroundTaskCanceledEventHandler 

事件类型

注解

有关系统可能取消后台任务的原因的信息,请参阅 BackgroundTaskCancellationReason

适用于