共用方式為


BluetoothDevice.GetDeviceSelectorFromConnectionStatus 方法

定義

(AQS) 篩選字串建立進階查詢語法,其中包含具有指定 BluetoothConnectionStatus 之藍牙裝置的查詢。 AQS 字串會傳遞至 CreateWatcher 方法,以傳回具有指定藍牙線上狀態的 DeviceInformation 物件集合。

public:
 static Platform::String ^ GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus connectionStatus);
 static winrt::hstring GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus const& connectionStatus);
public static string GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus connectionStatus);
function getDeviceSelectorFromConnectionStatus(connectionStatus)
Public Shared Function GetDeviceSelectorFromConnectionStatus (connectionStatus As BluetoothConnectionStatus) As String

參數

connectionStatus
BluetoothConnectionStatus

用於建構 AQS 字串的連接狀態。

傳回

String

Platform::String

winrt::hstring

可當做參數傳遞至 CreateWatcher 方法的 AQS 字串。

Windows 需求

裝置系列
Windows 10 (已於 10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v2.0 引進)
應用程式功能
bluetooth

適用於