DeviceInformationPairing.PairAsync 方法

定义

重载

PairAsync()

尝试配对设备。

PairAsync(DevicePairingProtectionLevel)

尝试使用提供的保护级别配对设备。

PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings)

尝试将设备对象与指定的保护级别和自定义设置配对。

PairAsync()

尝试配对设备。

public:
 virtual IAsyncOperation<DevicePairingResult ^> ^ PairAsync() = PairAsync;
/// [Windows.Foundation.Metadata.Overload("PairAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DevicePairingResult> PairAsync();
[Windows.Foundation.Metadata.Overload("PairAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DevicePairingResult> PairAsync();
function pairAsync()
Public Function PairAsync () As IAsyncOperation(Of DevicePairingResult)

返回

配对操作的结果。

属性

另请参阅

适用于

PairAsync(DevicePairingProtectionLevel)

尝试使用提供的保护级别配对设备。

public:
 virtual IAsyncOperation<DevicePairingResult ^> ^ PairAsync(DevicePairingProtectionLevel minProtectionLevel) = PairAsync;
/// [Windows.Foundation.Metadata.Overload("PairWithProtectionLevelAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel const& minProtectionLevel);
[Windows.Foundation.Metadata.Overload("PairWithProtectionLevelAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel);
function pairAsync(minProtectionLevel)
Public Function PairAsync (minProtectionLevel As DevicePairingProtectionLevel) As IAsyncOperation(Of DevicePairingResult)

参数

minProtectionLevel
DevicePairingProtectionLevel

用于配对操作的所需保护级别。

返回

配对操作的结果。

属性

注解

对于蓝牙以外的所有协议, 将忽略 minProtectionLevel 值,并且始终采用默认行为。 对于蓝牙协议,如果设备不支持指定的最低保护级别或更高级别,配对尝试将失败。 如果设备不支持指定的最低保护级别,但支持更高的保护级别,则使用更高的保护级别。

另请参阅

适用于

PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings)

尝试将设备对象与指定的保护级别和自定义设置配对。

public:
 virtual IAsyncOperation<DevicePairingResult ^> ^ PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings ^ devicePairingSettings) = PairAsync;
/// [Windows.Foundation.Metadata.Overload("PairWithProtectionLevelAndSettingsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel const& minProtectionLevel, IDevicePairingSettings const& devicePairingSettings);
[Windows.Foundation.Metadata.Overload("PairWithProtectionLevelAndSettingsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings devicePairingSettings);
function pairAsync(minProtectionLevel, devicePairingSettings)
Public Function PairAsync (minProtectionLevel As DevicePairingProtectionLevel, devicePairingSettings As IDevicePairingSettings) As IAsyncOperation(Of DevicePairingResult)

参数

minProtectionLevel
DevicePairingProtectionLevel

用于配对操作的所需保护级别。

devicePairingSettings
IDevicePairingSettings

自定义设备配对设置。

返回

配对操作的结果。

属性

Windows 要求

设备系列
Windows 10 (在 10.0.10586.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v2.0 中引入)

注解

对于蓝牙以外的所有协议, 将忽略 minProtectionLevel 值,并且始终采用默认行为。 对于蓝牙协议,如果设备不支持指定的最低保护级别或更高级别,配对尝试将失败。 如果设备不支持指定的最低保护级别,但支持更高的保护级别,则使用更高的保护级别。

另请参阅

适用于