你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

NotificationHubClient.SendDirectNotificationAsync 方法

定义

重载

SendDirectNotificationAsync(Notification, IList<String>)

将通知直接发送到 deviceHandles 中列出的所有设备, (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

SendDirectNotificationAsync(Notification, String)

将通知直接发送到 deviceHandle (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

SendDirectNotificationAsync(Notification, IList<String>, CancellationToken)

将通知直接发送到 deviceHandles 中列出的所有设备, (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

SendDirectNotificationAsync(Notification, String, CancellationToken)

将通知直接发送到 deviceHandle (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

SendDirectNotificationAsync(Notification, IList<String>)

将通知直接发送到 deviceHandles 中列出的所有设备, (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendDirectNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, System.Collections.Generic.IList<string> deviceHandles);
abstract member SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Collections.Generic.IList<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Collections.Generic.IList<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandles As IList(Of String)) As Task(Of NotificationOutcome)

参数

notification
Notification

通知的实例,标识要发送到的推送通知服务。

deviceHandles
IList<String>

有效设备标识符的列表。

返回

实现

例外

当 notification 或 deviceHandles 对象为 null 时引发

适用于

SendDirectNotificationAsync(Notification, String)

将通知直接发送到 deviceHandle (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendDirectNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, string deviceHandle);
abstract member SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandle As String) As Task(Of NotificationOutcome)

参数

notification
Notification

通知的实例,标识要发送到的推送通知服务。

deviceHandle
String

有效的设备标识符。

返回

实现

例外

当 notification 或 deviceHandle 对象为 null 时引发

适用于

SendDirectNotificationAsync(Notification, IList<String>, CancellationToken)

将通知直接发送到 deviceHandles 中列出的所有设备, (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendDirectNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, System.Collections.Generic.IList<string> deviceHandles, System.Threading.CancellationToken cancellationToken);
abstract member SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Collections.Generic.IList<string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Collections.Generic.IList<string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandles As IList(Of String), cancellationToken As CancellationToken) As Task(Of NotificationOutcome)

参数

notification
Notification

通知的实例,标识要发送到的推送通知服务。

deviceHandles
IList<String>

有效设备标识符的列表。

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

实现

例外

当 notification 或 deviceHandles 对象为 null 时引发

适用于

SendDirectNotificationAsync(Notification, String, CancellationToken)

将通知直接发送到 deviceHandle (由通知类型) 表示的有效令牌。 此 API 的用户不使用注册或安装。 相反,此 API 的用户自行管理所有设备,并仅将 Azure 通知中心用作直通服务来与各种推送通知服务通信。

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendDirectNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, string deviceHandle, System.Threading.CancellationToken cancellationToken);
abstract member SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendDirectNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandle As String, cancellationToken As CancellationToken) As Task(Of NotificationOutcome)

参数

notification
Notification

通知的实例,标识要发送到的推送通知服务。

deviceHandle
String

有效的设备标识符。

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

实现

例外

当 notification 或 deviceHandle 对象为 null 时引发

适用于