NotificationHubClient.SendNotificationAsync Method

Definition

Overloads

SendNotificationAsync(Notification, String)

Sends a notification to a tag expression (a single tag "tag" is a valid tag expression).

SendNotificationAsync(Notification)

Sends a notification to a non-empty set of tags (max 20). This is equivalent to a tag expression with boolean ORs ("||").

SendNotificationAsync(Notification, IEnumerable<String>)

Asynchronously sends a notification to a non-empty set of tags (max 20). This is equivalent to a tag expression with boolean ORs ("||").

SendNotificationAsync(Notification, String)

Sends a notification to a tag expression (a single tag "tag" is a valid tag expression).

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, string tagExpression);
Parameters
notification
Notification

The notification to send.

tagExpression
String

A tag expression is any boolean expression constructed using the logical operators AND (&&), OR (||), NOT (!), and round parentheses. For example: (A || B) && !C. If an expression uses only ORs, it can contain at most 20 tags. Other expressions are limited to 6 tags. Note that a single tag "A" is a valid expression.

Returns

NotificationOutcome which describes the result of the Send operation.

Exceptions

notification.Tag property should be null

SendNotificationAsync(Notification)

Sends a notification to a non-empty set of tags (max 20). This is equivalent to a tag expression with boolean ORs ("||").

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification);
Parameters
notification
Notification

The notification to send.

Returns

NotificationOutcome which describes the result of the Send operation.

Exceptions

SendNotificationAsync(Notification, IEnumerable<String>)

Asynchronously sends a notification to a non-empty set of tags (max 20). This is equivalent to a tag expression with boolean ORs ("||").

public System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendNotificationAsync (Microsoft.Azure.NotificationHubs.Notification notification, System.Collections.Generic.IEnumerable<string> tags);
Parameters
notification
Notification

The notification to send.

tags
IEnumerable<String>

A non-empty set of tags (max 20 tags). Each string in the set can contain a single tag.

Returns

NotificationOutcome which describes the result of the Send operation.

Exceptions

Thrown when notification or tag object is null

notification.Tag property should not be null or tags argument should contain atleat one tag