ModuleClient.SetMessageHandlerAsync(MessageHandler, Object) ModuleClient.SetMessageHandlerAsync(MessageHandler, Object) Method

Definition

Registers a new default delegate which applies to all endpoints. If a delegate is already associated with the input, it will be called, else the default delegate will be called. If a default delegate was set previously, it will be overwritten.

The delegate to be called when a message is sent to any input.generic parameter to be interpreted by the client code.
public System.Threading.Tasks.Task SetMessageHandlerAsync (Microsoft.Azure.Devices.Client.MessageHandler messageHandler, object userContext);
member this.SetMessageHandlerAsync : Microsoft.Azure.Devices.Client.MessageHandler * obj -> System.Threading.Tasks.Task

Parameters

userContext
Object Object

Returns

The task containing the event

Applies to