PushClient.SendAsync Method

Definition

Overloads

SendAsync(IPushMessage)

Sends a notification to the Notification Hub.

SendAsync(IPushMessage, IEnumerable<String>)
Obsolete.

Sends a notification to the Notification Hub with a given tag expression.

SendAsync(IPushMessage, String)

Sends a notification to the Notification Hub with a given tag expression.

SendAsync(IPushMessage)

Sends a notification to the Notification Hub.

public virtual System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendAsync (Microsoft.Azure.Mobile.Server.Notifications.IPushMessage message);
abstract member SendAsync : Microsoft.Azure.Mobile.Server.Notifications.IPushMessage -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendAsync : Microsoft.Azure.Mobile.Server.Notifications.IPushMessage -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Overridable Function SendAsync (message As IPushMessage) As Task(Of NotificationOutcome)

Parameters

message
IPushMessage

The notification payload is one of WindowsPushMessage, ApplePushMessage, or TemplatePushMessage.

Returns

A Task<TResult> representing the notification send operation.

Applies to

SendAsync(IPushMessage, IEnumerable<String>)

Caution

This method is obsolete. You should use the HubClient.SendNotificationAsync() method instead.

Sends a notification to the Notification Hub with a given tag expression.

[System.Obsolete("This method is obsolete. You should use the HubClient.SendNotificationAsync() method instead.")]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendAsync (Microsoft.Azure.Mobile.Server.Notifications.IPushMessage message, System.Collections.Generic.IEnumerable<string> tags);
[<System.Obsolete("This method is obsolete. You should use the HubClient.SendNotificationAsync() method instead.")>]
abstract member SendAsync : Microsoft.Azure.Mobile.Server.Notifications.IPushMessage * seq<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendAsync : Microsoft.Azure.Mobile.Server.Notifications.IPushMessage * seq<string> -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Overridable Function SendAsync (message As IPushMessage, tags As IEnumerable(Of String)) As Task(Of NotificationOutcome)

Parameters

message
IPushMessage

The notification payload is one of WindowsPushMessage, ApplePushMessage, or TemplatePushMessage.

tags
IEnumerable<String>

The set of tags to use for this notification.

Returns

A Task<TResult> representing the notification send operation.

Attributes

Remarks

This method is obsolete. You should use the HubClient.SendNotificationAsync() method instead.

Applies to

SendAsync(IPushMessage, String)

Sends a notification to the Notification Hub with a given tag expression.

public virtual System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome> SendAsync (Microsoft.Azure.Mobile.Server.Notifications.IPushMessage message, string tagExpression);
abstract member SendAsync : Microsoft.Azure.Mobile.Server.Notifications.IPushMessage * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
override this.SendAsync : Microsoft.Azure.Mobile.Server.Notifications.IPushMessage * string -> System.Threading.Tasks.Task<Microsoft.Azure.NotificationHubs.NotificationOutcome>
Public Overridable Function SendAsync (message As IPushMessage, tagExpression As String) As Task(Of NotificationOutcome)

Parameters

message
IPushMessage

The notification payload is one of WindowsPushMessage, ApplePushMessage, or TemplatePushMessage.

tagExpression
String

A tag expression representing the combination of tags to use for this notification.

Returns

A Task<TResult> representing the notification send operation.

Applies to