Share via


PushNotificationChannel 类

定义

表示推送通知通道。

public ref class PushNotificationChannel sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.PushNotifications.PushNotificationsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PushNotificationChannel final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.PushNotifications.PushNotificationsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PushNotificationChannel
Public NotInheritable Class PushNotificationChannel
继承
Object Platform::Object IInspectable PushNotificationChannel
属性

注解

通过调用 CreateChannelAsync 请求推送通知通道,传入应用的 Azure Active Directory (AAD) 应用程序 ID。 成功完成后,将 Uri 属性的值传递给云服务。 云服务使用此 URI 向 Windows 推送通知服务发送通知请求, (WNS) 请求向设备发送推送通知,并调用 PushReceived 事件。

属性

ExpirationTime

获取推送通知通道的过期时间,此后必须使用 CreateChannelAsync 请求新通道。

Uri

获取表示推送通知通道的 URI。

方法

Close()

关闭推送通知通道,之后必须使用 [CreateChannelAsync] (xref:Microsoft.Windows.PushNotifications.PushNotificationManager.CreateChannelAsync (System.Guid)

适用于