DeviceClient.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 a hub |
SendEventAsync(Message, CancellationToken) |
Sends an event to a hub |
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
The task to await
Applies to
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
- System.Threading.CancellationToken
A cancellation token to cancel the operation.
Returns
The task to await
Exceptions
Thrown when the operation has been canceled.