NotificationHubClient.SendNotificationAsync Method

Definition

Overloads

SendNotificationAsync(Notification, String)

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

SendNotificationAsync(Notification)

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, 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)

Asynchronously 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);
member this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>

Parameters

notification
Notification

The notification to send.

tagExpression
System.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

System.Threading.Tasks.Task<NotificationOutcome>

The task that completes the asynchronous operation.

Exceptions

System.ArgumentNullException

notification

System.ArgumentException

notification.Tag property should be null

Applies to

SendNotificationAsync(Notification)

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);
member this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>

Parameters

notification
Notification

The notification to send.

Returns

System.Threading.Tasks.Task<NotificationOutcome>

The task that completes the asynchronous operation.

Exceptions

System.ArgumentNullException

notification

Applies to

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);
member this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * seq<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>

Parameters

notification
Notification

The notification to send.

tags
System.Collections.Generic.IEnumerable<System.String>

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

Returns

System.Threading.Tasks.Task<NotificationOutcome>

The task that completes the asynchronous operation.

Exceptions

System.ArgumentNullException

Thrown when notification or tag object is null

System.ArgumentException

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

Applies to