PnpObject.CreateFromIdAsync 方法

定义

从以前保存的 DeviceInformation ID 异步创建 PnpObject 对象。

public:
 static IAsyncOperation<PnpObject ^> ^ CreateFromIdAsync(PnpObjectType type, Platform::String ^ id, IIterable<Platform::String ^> ^ requestedProperties);
 static IAsyncOperation<PnpObject> CreateFromIdAsync(PnpObjectType const& type, winrt::hstring const& id, IIterable<winrt::hstring> const& requestedProperties);
public static IAsyncOperation<PnpObject> CreateFromIdAsync(PnpObjectType type, string id, IEnumerable<string> requestedProperties);
function createFromIdAsync(type, id, requestedProperties)
Public Shared Function CreateFromIdAsync (type As PnpObjectType, id As String, requestedProperties As IEnumerable(Of String)) As IAsyncOperation(Of PnpObject)

参数

type
PnpObjectType

PnpObject 的类型。

id
String

标识 PnpObject 的字符串值。

requestedProperties

IIterable<String>

IEnumerable<String>

要创建的 PnpObject 对象的 Properties 属性中包含的附加属性的可迭代列表。 有关属性表示的内容的详细信息,请参阅 设备信息属性

返回

IAsyncOperation<PnpObject>

从以前保存的 DeviceInformation ID 创建的 PnpObject

适用于