INotificationHubClient.SendDirectNotificationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SendDirectNotificationAsync(Notification, IList<String>) |
Sends a notification directly to all devices listed in deviceHandles (a valid tokens as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services. |
SendDirectNotificationAsync(Notification, String) |
Sends a notification directly to a deviceHandle (a valid token as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services. |
SendDirectNotificationAsync(Notification, IList<String>, CancellationToken) |
Sends a notification directly to all devices listed in deviceHandles (a valid tokens as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services. |
SendDirectNotificationAsync(Notification, String, CancellationToken) |
Sends a notification directly to a deviceHandle (a valid token as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services. |
SendDirectNotificationAsync(Notification, IList<String>)
Sends a notification directly to all devices listed in deviceHandles (a valid tokens as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.
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>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandles As IList(Of String)) As Task(Of NotificationOutcome)
Parameters
- notification
- Notification
A instance of a Notification, identifying which Push Notification Service to send to.
Returns
Exceptions
Thrown when notification or deviceHandles object is null
Applies to
SendDirectNotificationAsync(Notification, String)
Sends a notification directly to a deviceHandle (a valid token as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.
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>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandle As String) As Task(Of NotificationOutcome)
Parameters
- notification
- Notification
A instance of a Notification, identifying which Push Notification Service to send to.
- deviceHandle
- String
A valid device identifier.
Returns
Exceptions
Thrown when notification or deviceHandle object is null
Applies to
SendDirectNotificationAsync(Notification, IList<String>, CancellationToken)
Sends a notification directly to all devices listed in deviceHandles (a valid tokens as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.
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>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandles As IList(Of String), cancellationToken As CancellationToken) As Task(Of NotificationOutcome)
Parameters
- notification
- Notification
A instance of a Notification, identifying which Push Notification Service to send to.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
Exceptions
Thrown when notification or deviceHandles object is null
Applies to
SendDirectNotificationAsync(Notification, String, CancellationToken)
Sends a notification directly to a deviceHandle (a valid token as expressed by the Notification type). Users of this API do not use Registrations or Installations. Instead, users of this API manage all devices on their own and use Azure Notification Hub solely as a pass through service to communicate with the various Push Notification Services.
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>
Public Function SendDirectNotificationAsync (notification As Notification, deviceHandle As String, cancellationToken As CancellationToken) As Task(Of NotificationOutcome)
Parameters
- notification
- Notification
A instance of a Notification, identifying which Push Notification Service to send to.
- deviceHandle
- String
A valid device identifier.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
Exceptions
Thrown when notification or deviceHandle object is null
Applies to
Azure SDK for .NET