ModuleClient.SendEventAsync Method

Definition

Overloads

SendEventAsync(Message)

Sends an event to IoT hub

SendEventAsync(Message, CancellationToken)

Sends an event to IoT hub

SendEventAsync(String, Message)

Sends an event to IoT hub.

SendEventAsync(String, Message, CancellationToken)

Sends an event to IoT hub.

SendEventAsync(Message)

Sends an event to IoT 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.

Returns

Task

The message containing the event

Applies to

SendEventAsync(Message, CancellationToken)

Sends an event to IoT 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.

cancellationToken
CancellationToken

A cancellation token to cancel the operation.

Returns

Task

The message containing the event

Exceptions

Thrown when the operation has been canceled.

Applies to

SendEventAsync(String, Message)

Sends an event to IoT hub.

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

Parameters

outputName
String

The output target for sending the given message

message
Message

The message to send

Returns

Task

The message containing the event

Exceptions

Thrown when the operation has been canceled.

Applies to

SendEventAsync(String, Message, CancellationToken)

Sends an event to IoT hub.

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

Parameters

outputName
String

The output target for sending the given message

message
Message

The message to send

cancellationToken
CancellationToken

A cancellation token to cancel the operation.

Returns

Task

The message containing the event

Exceptions

Thrown when the operation has been canceled.

Applies to