PushNotificationReceivedEventArgs.Canceled 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当系统要取消启动的后台任务以处理 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。