Bahasa

PushNotificationReceivedEventArgs Kelas

Definisi

Menyediakan data untuk peristiwa PushReceived .

public ref class PushNotificationReceivedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.PushNotifications.PushNotificationsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PushNotificationReceivedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.PushNotifications.PushNotificationsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PushNotificationReceivedEventArgs
Public NotInheritable Class PushNotificationReceivedEventArgs
Warisan
Object Platform::Object IInspectable PushNotificationReceivedEventArgs
Atribut

Keterangan

Untuk memastikan bahwa penanganan aktivitas PushReceived dipanggil dalam proses aplikasi yang sedang berjalan, pastikan untuk mendaftarkan handler untuk peristiwa ini sebelum memanggil Daftar. Jika tidak, pengecualian runtime berikut akan dilemparkan:

System.Runtime.InteropServices.COMException: 'Element not found. Must register event handlers before calling Register().'

Properti

Nama Deskripsi
Payload

Mendapatkan payload pemberitahuan push yang memicu peristiwa PushReceived terkait.

Metode

Nama Deskripsi
GetDeferral()

Menginformasikan sistem bahwa aplikasi mungkin terus melakukan pekerjaan setelah penanganan aktivitas PushReceived kembali.

Acara

Nama Deskripsi
Canceled

Muncul ketika sistem akan membatalkan tugas latar belakang yang diluncurkan untuk menangani peristiwa PushReceived .

Berlaku untuk