AllJoynServiceInfo.FromIdAsync(String) 方法

定义

重要

Windows.Devices.AllJoyn 命名空间中的类型已弃用,将来的 Windows 版本中可能不可用。 AllJoyn(由 AllSeen Alliance 赞助)是一种开源发现和通信协议,适用于物联网 (IoT) 方案,例如开灯和关灯以及读取温度。 有关替代项(如 IoTivity LiteIoTivity),请参阅 iotivity.org 网站。

将设备枚举获取的 DeviceInformation ID 转换为 AllJoynServiceInfo 对象。

public:
 static IAsyncOperation<AllJoynServiceInfo ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<AllJoynServiceInfo> FromIdAsync(winrt::hstring const& deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("AllJoynServiceInfo has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
 static IAsyncOperation<AllJoynServiceInfo> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<AllJoynServiceInfo> FromIdAsync(string deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("AllJoynServiceInfo has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
public static IAsyncOperation<AllJoynServiceInfo> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of AllJoynServiceInfo)

参数

deviceId
String

Platform::String

winrt::hstring

获取的 DeviceInformation ID

返回

对应于 ID 的 AllJoynServiceInfo 对象。 此对象可用于建立与远程终结点的会话,并从中检索关于数据。

属性

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)
应用功能
allJoyn

适用于