你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

RegistryManager.GetTwinAsync Method

Definition

Overloads

GetTwinAsync(String)

Gets Twin from IotHub

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin> GetTwinAsync(string deviceId);
abstract member GetTwinAsync : string -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
override this.GetTwinAsync : string -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
Public Overridable Function GetTwinAsync (deviceId As String) As Task(Of Twin)

Parameters

deviceId
String

The device Id.

Returns

Twin instance.

Applies to

GetTwinAsync(String, String)

Gets Module's Twin from IotHub

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin> GetTwinAsync(string deviceId, string moduleId);
abstract member GetTwinAsync : string * string -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
override this.GetTwinAsync : string * string -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
Public Overridable Function GetTwinAsync (deviceId As String, moduleId As String) As Task(Of Twin)

Parameters

deviceId
String

The device Id.

moduleId
String

The module Id.

Returns

Twin instance.

Applies to

GetTwinAsync(String, CancellationToken)

Gets Twin from IotHub

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin> GetTwinAsync(string deviceId, System.Threading.CancellationToken cancellationToken);
abstract member GetTwinAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
override this.GetTwinAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
Public Overridable Function GetTwinAsync (deviceId As String, cancellationToken As CancellationToken) As Task(Of Twin)

Parameters

deviceId
String

The device Id.

cancellationToken
CancellationToken

Task cancellation token.

Returns

Twin instance.

Applies to

GetTwinAsync(String, String, CancellationToken)

Gets Module's Twin from IotHub

public virtual System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin> GetTwinAsync(string deviceId, string moduleId, System.Threading.CancellationToken cancellationToken);
abstract member GetTwinAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
override this.GetTwinAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Shared.Twin>
Public Overridable Function GetTwinAsync (deviceId As String, moduleId As String, cancellationToken As CancellationToken) As Task(Of Twin)

Parameters

deviceId
String

The device Id.

moduleId
String

The module Id.

cancellationToken
CancellationToken

Task cancellation token.

Returns

Twin instance.

Applies to