NotificationHubClient.SendNotificationAsync Method

Definition

Overloads

SendNotificationAsync(Notification, String, CancellationToken)

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

SendNotificationAsync(Notification, IEnumerable<String>, CancellationToken)

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

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

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

SendNotificationAsync(Notification, String, CancellationToken)

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, System.Threading.CancellationToken cancellationToken);
abstract member SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendNotificationAsync (notification As Notification, tagExpression As String, cancellationToken As CancellationToken) As Task(Of NotificationOutcome)

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.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

NotificationOutcome which describes the result of the Send operation.

Implements

Exceptions

notification

notification.Tag property should be null

Applies to

SendNotificationAsync(Notification, IEnumerable<String>, CancellationToken)

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, System.Threading.CancellationToken cancellationToken);
abstract member SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * seq<string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * seq<string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendNotificationAsync (notification As Notification, tags As IEnumerable(Of String), cancellationToken As CancellationToken) As Task(Of NotificationOutcome)

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.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

NotificationOutcome which describes the result of the Send operation.

Implements

Exceptions

Thrown when notification or tag object is null

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

Applies to

SendNotificationAsync(Notification, CancellationToken)

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.Threading.CancellationToken cancellationToken);
abstract member SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendNotificationAsync (notification As Notification, cancellationToken As CancellationToken) As Task(Of NotificationOutcome)

Parameters

notification
Notification

The notification to send.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

NotificationOutcome which describes the result of the Send operation.

Implements

Exceptions

notification

Applies to

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);
abstract member SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendNotificationAsync (notification As Notification) As Task(Of NotificationOutcome)

Parameters

notification
Notification

The notification to send.

Returns

NotificationOutcome which describes the result of the Send operation.

Implements

Exceptions

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);
abstract member SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * seq<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * seq<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendNotificationAsync (notification As Notification, tags As IEnumerable(Of String)) As Task(Of NotificationOutcome)

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.

Implements

Exceptions

Thrown when notification or tag object is null

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

Applies to

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);
abstract member SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendNotificationAsync : Microsoft.Azure.NotificationHubs.Notification * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Function SendNotificationAsync (notification As Notification, tagExpression As String) As Task(Of NotificationOutcome)

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.

Implements

Exceptions

notification

notification.Tag property should be null

Applies to