DeviceClient.SendEventAsync Method

Definition

Overloads

SendEventAsync(Message, CancellationToken)

Sends an event to a hub

SendEventAsync(Message)

Sends an event to a hub

SendEventAsync(Message, CancellationToken)

Sends an event to a hub

public System.Threading.Tasks.Task SendEventAsync (Microsoft.Azure.Devices.Client.Message message, System.Threading.CancellationToken cancellationToken);
member this.SendEventAsync : Microsoft.Azure.Devices.Client.Message * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SendEventAsync (message As Message, cancellationToken As CancellationToken) As Task

Parameters

message
Message

The message to send. Should be disposed after sending.

cancellationToken
CancellationToken

A cancellation token to cancel the operation.

Returns

Task

The task to await

Exceptions

Thrown when the operation has been canceled.

SendEventAsync(Message)

Sends an event to a hub

public System.Threading.Tasks.Task SendEventAsync (Microsoft.Azure.Devices.Client.Message message);
member this.SendEventAsync : Microsoft.Azure.Devices.Client.Message -> System.Threading.Tasks.Task
Public Function SendEventAsync (message As Message) As Task

Parameters

message
Message

The message to send. Should be disposed after sending.

Returns

Task

The task to await

Applies to