ModuleClient.SendEventAsync Method

Definition

Overloads

SendEventAsync(Message)

Sends an event to device hub

SendEventAsync(Message, CancellationToken)

Sends an event to device hub

SendEventAsync(String, Message)

Sends an event to device hub.

SendEventAsync(String, Message, CancellationToken)

Sends an event to device hub.

SendEventAsync(Message)

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

Parameters

message
Message

The message.

Returns

The message containing the event

SendEventAsync(Message, CancellationToken)

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

Parameters

message
Message

The message.

cancellationToken
CancellationToken

A cancellation token to cancel the operation.

Returns

The message containing the event

Exceptions

Thrown when the operation has been canceled.

SendEventAsync(String, Message)

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

Parameters

outputName
String

The output target for sending the given message

message
Message

The message to send

Returns

The message containing the event

Exceptions

Thrown when the operation has been canceled.

SendEventAsync(String, Message, CancellationToken)

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

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

The message containing the event

Exceptions

Thrown when the operation has been canceled.

Applies to