BluetoothLEDevice.GetDeviceSelectorFromPairingState(Boolean) 方法

定义

(AQS) 筛选器字符串创建高级查询语法,其中包含配对或未配对蓝牙 LE 设备的查询。 AQS 字符串将传递到 CreateWatcher 方法,以返回 DeviceInformation 对象的集合。

public:
 static Platform::String ^ GetDeviceSelectorFromPairingState(bool pairingState);
 static winrt::hstring GetDeviceSelectorFromPairingState(bool const& pairingState);
public static string GetDeviceSelectorFromPairingState(bool pairingState);
function getDeviceSelectorFromPairingState(pairingState)
Public Shared Function GetDeviceSelectorFromPairingState (pairingState As Boolean) As String

参数

pairingState
Boolean

bool

用于构造 AQS 字符串的蓝牙 LE 设备的当前配对状态。 蓝牙 LE 设备可以配对 (true) 或未配对 (false) 。 AQS 筛选器字符串将请求在 pairingState 为 false 时执行扫描。

返回

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

适用于