Share via


NotificationHubClient.SendNotificationAsync Método

Definição

Sobrecargas

SendNotificationAsync(Notification, String, CancellationToken)

Envia uma notificação para uma expressão de marca (uma única marca "tag" é uma expressão de marca válida).

SendNotificationAsync(Notification, IEnumerable<String>, CancellationToken)

Envia de forma assíncrona uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

SendNotificationAsync(Notification, CancellationToken)

Envia uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

SendNotificationAsync(Notification)

Envia uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

SendNotificationAsync(Notification, IEnumerable<String>)

Envia de forma assíncrona uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

SendNotificationAsync(Notification, String)

Envia uma notificação para uma expressão de marca (uma única marca "tag" é uma expressão de marca válida).

SendNotificationAsync(Notification, String, CancellationToken)

Envia uma notificação para uma expressão de marca (uma única marca "tag" é uma expressão de marca válida).

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)

Parâmetros

notification
Notification

A notificação a ser enviada.

tagExpression
String

Uma expressão de marca é qualquer expressão booliana construída usando os operadores lógicos AND (&&), OR (||), NOT (!)e parênteses redondos. Por exemplo: (A || B) && !C. Se uma expressão usa apenas ORs, ela pode conter no máximo 20 marcas. Outras expressões são limitadas a 6 marcas. Observe que uma única marca "A" é uma expressão válida.

cancellationToken
CancellationToken

Um CancellationToken a ser observado ao aguardar a conclusão da tarefa.

Retornos

NotificationOutcome que descreve o resultado da operação Enviar.

Implementações

Exceções

notificação

Notificação. A propriedade Tag deve ser nula

Aplica-se a

SendNotificationAsync(Notification, IEnumerable<String>, CancellationToken)

Envia de forma assíncrona uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

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)

Parâmetros

notification
Notification

A notificação a ser enviada.

tags
IEnumerable<String>

Um conjunto não vazio de marcas (no máximo 20 marcas). Cada cadeia de caracteres no conjunto pode conter uma única marca.

cancellationToken
CancellationToken

Um CancellationToken a ser observado ao aguardar a conclusão da tarefa.

Retornos

NotificationOutcome que descreve o resultado da operação Enviar.

Implementações

Exceções

Gerado quando o objeto de notificação ou marca é nulo

Notificação. A propriedade Tag não deve ser nula ou o argumento tags deve conter pelo menos uma marca

Aplica-se a

SendNotificationAsync(Notification, CancellationToken)

Envia uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

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)

Parâmetros

notification
Notification

A notificação a ser enviada.

cancellationToken
CancellationToken

Um CancellationToken a ser observado ao aguardar a conclusão da tarefa.

Retornos

NotificationOutcome que descreve o resultado da operação Enviar.

Implementações

Exceções

notificação

Aplica-se a

SendNotificationAsync(Notification)

Envia uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

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)

Parâmetros

notification
Notification

A notificação a ser enviada.

Retornos

NotificationOutcome que descreve o resultado da operação Enviar.

Implementações

Exceções

notificação

Aplica-se a

SendNotificationAsync(Notification, IEnumerable<String>)

Envia de forma assíncrona uma notificação para um conjunto não vazio de marcas (máximo de 20). Isso é equivalente a uma expressão de marca com ORs boolianos ("||").

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)

Parâmetros

notification
Notification

A notificação a ser enviada.

tags
IEnumerable<String>

Um conjunto não vazio de marcas (no máximo 20 marcas). Cada cadeia de caracteres no conjunto pode conter uma única marca.

Retornos

NotificationOutcome que descreve o resultado da operação Enviar.

Implementações

Exceções

Gerado quando o objeto de notificação ou marca é nulo

Notificação. A propriedade Tag não deve ser nula ou o argumento tags deve conter pelo menos uma marca

Aplica-se a

SendNotificationAsync(Notification, String)

Envia uma notificação para uma expressão de marca (uma única marca "tag" é uma expressão de marca válida).

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)

Parâmetros

notification
Notification

A notificação a ser enviada.

tagExpression
String

Uma expressão de marca é qualquer expressão booliana construída usando os operadores lógicos AND (&&), OR (||), NOT (!)e parênteses redondos. Por exemplo: (A || B) && !C. Se uma expressão usa apenas ORs, ela pode conter no máximo 20 marcas. Outras expressões são limitadas a 6 marcas. Observe que uma única marca "A" é uma expressão válida.

Retornos

NotificationOutcome que descreve o resultado da operação Enviar.

Implementações

Exceções

notificação

Notificação. A propriedade Tag deve ser nula

Aplica-se a