ModuleClient.InvokeMethodAsync Method

Definition

Overloads

InvokeMethodAsync(String, String, MethodRequest, CancellationToken)

Interactively invokes a method on module

InvokeMethodAsync(String, String, MethodRequest)

Interactively invokes a method on module

InvokeMethodAsync(String, MethodRequest, CancellationToken)

Interactively invokes a method on device

InvokeMethodAsync(String, MethodRequest)

Interactively invokes a method on device

InvokeMethodAsync(String, String, MethodRequest, CancellationToken)

Interactively invokes a method on module

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse> InvokeMethodAsync (string deviceId, string moduleId, Microsoft.Azure.Devices.Client.MethodRequest methodRequest, System.Threading.CancellationToken cancellationToken);
member this.InvokeMethodAsync : string * string * Microsoft.Azure.Devices.Client.MethodRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse>

Parameters

deviceId
String

Device Id

moduleId
String

Module Id

methodRequest
MethodRequest

Device method parameters (passthrough to device)

cancellationToken
CancellationToken

Cancellation Token

Returns

Method result

Exceptions

Thrown when the operation has been canceled.

InvokeMethodAsync(String, String, MethodRequest)

Interactively invokes a method on module

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse> InvokeMethodAsync (string deviceId, string moduleId, Microsoft.Azure.Devices.Client.MethodRequest methodRequest);
member this.InvokeMethodAsync : string * string * Microsoft.Azure.Devices.Client.MethodRequest -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse>

Parameters

deviceId
String

Device Id

moduleId
String

Module Id

methodRequest
MethodRequest

Device method parameters (passthrough to device)

Returns

Method result

Exceptions

Thrown when the operation has been canceled.

InvokeMethodAsync(String, MethodRequest, CancellationToken)

Interactively invokes a method on device

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse> InvokeMethodAsync (string deviceId, Microsoft.Azure.Devices.Client.MethodRequest methodRequest, System.Threading.CancellationToken cancellationToken);
member this.InvokeMethodAsync : string * Microsoft.Azure.Devices.Client.MethodRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse>

Parameters

deviceId
String

Device Id

methodRequest
MethodRequest

Device method parameters (passthrough to device)

cancellationToken
CancellationToken

Cancellation Token

Returns

Method result

Exceptions

Thrown when the operation has been canceled.

InvokeMethodAsync(String, MethodRequest)

Interactively invokes a method on device

public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse> InvokeMethodAsync (string deviceId, Microsoft.Azure.Devices.Client.MethodRequest methodRequest);
member this.InvokeMethodAsync : string * Microsoft.Azure.Devices.Client.MethodRequest -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Client.MethodResponse>

Parameters

deviceId
String

Device Id

methodRequest
MethodRequest

Device method parameters (passthrough to device)

Returns

Method result

Applies to