ModuleClient.SendEventAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
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
- System.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.
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
The message containing the event
Exceptions
Thrown when the operation has been canceled.