Share via


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

System.Threading.Tasks.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
System.Threading.CancellationToken

A cancellation token to cancel the operation.

Returns

System.Threading.Tasks.Task

The message containing the event

Exceptions

System.OperationCanceledException

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
System.String

The output target for sending the given message

message
Message

The message to send

Returns

System.Threading.Tasks.Task

The message containing the event

Exceptions

System.OperationCanceledException

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
System.String

The output target for sending the given message

message
Message

The message to send

cancellationToken
System.Threading.CancellationToken

A cancellation token to cancel the operation.

Returns

System.Threading.Tasks.Task

The message containing the event

Exceptions

System.OperationCanceledException

Thrown when the operation has been canceled.

Applies to