PerceptionColorFrameSource.FromIdAsync(String) 方法

定义

通过查找颜色帧的唯一 ID 来查找颜色帧源。

public:
 static IAsyncOperation<PerceptionColorFrameSource ^> ^ FromIdAsync(Platform::String ^ id);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<PerceptionColorFrameSource> FromIdAsync(winrt::hstring const& id);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("PerceptionColorFrameSource.FromIdAsync may be unavailable after Windows Creator Update.  Use Windows.Devices.Enumeration.DeviceInformation.FromIdAsync instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
 static IAsyncOperation<PerceptionColorFrameSource> FromIdAsync(winrt::hstring const& id);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<PerceptionColorFrameSource> FromIdAsync(string id);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("PerceptionColorFrameSource.FromIdAsync may be unavailable after Windows Creator Update.  Use Windows.Devices.Enumeration.DeviceInformation.FromIdAsync instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public static IAsyncOperation<PerceptionColorFrameSource> FromIdAsync(string id);
function fromIdAsync(id)
Public Shared Function FromIdAsync (id As String) As IAsyncOperation(Of PerceptionColorFrameSource)

参数

id
String

Platform::String

winrt::hstring

颜色帧源的唯一 ID。

返回

此方法完成后,如果存在具有指定 ID 的颜色帧源,它将异步返回颜色帧源。 否则,此方法异步返回 null。

属性

适用于