共用方式為


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) 應用程式識別碼。 成功完成時,將 Uri 屬性的值傳遞至您的雲端服務。 您的雲端服務會使用此 URI 將通知要求傳送至 Windows 推播通知服務 (WNS) ,以要求傳送推播通知至裝置,叫用 PushReceived 事件。

屬性

ExpirationTime

取得推播通知通道的到期時間,之後必須使用 CreateChannelAsync要求新的通道。

Uri

取得表示推播通知通道的 URI。

方法

Close()

關閉推播通知通道,之後必須使用 [CreateChannelAsync] (xref:Microsoft.Windows.PushNotifications.PushNotificationManager.CreateChannelAsync (System.Guid)

適用於