DeviceInformationPairing 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
包含信息并启用设备的配对。
public ref class DeviceInformationPairing sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DeviceInformationPairing final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DeviceInformationPairing
Public NotInheritable Class DeviceInformationPairing
- 继承
- 属性
Windows 要求
| 设备系列 |
Windows 10 (在 10.0.10240.0 中引入)
|
| API contract |
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
|
注解
版本历史记录
| Windows 版本 | SDK 版本 | 增值 |
|---|---|---|
| 1511 | 10586 | 自定义 |
| 1511 | 10586 | PairAsync (DevicePairingProtectionLevel,IDevicePairingSettings) |
| 1511 | 10586 | ProtectionLevel |
| 1511 | 10586 | TryRegisterForAllInboundPairingRequests |
| 1511 | 10586 | UnpairAsync |
| 1809 | 17763 | TryRegisterForAllInboundPairingRequestsWithProtectionLevel |
属性
| CanPair |
获取一个值,该值指示设备是否可以配对。 |
| Custom |
获取自定义配对所需的 DeviceInformationCustomPairing 对象。 |
| IsPaired |
获取一个值,该值指示设备当前是否已配对。 |
| ProtectionLevel |
获取用于配对设备的保护级别。 |
方法
| PairAsync() |
尝试配对设备。 |
| PairAsync(DevicePairingProtectionLevel) |
尝试使用提供的保护级别配对设备。 |
| PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) |
尝试将设备对象与指定的保护级别和自定义设置配对。 |
| TryRegisterForAllInboundPairingRequests(DevicePairingKinds) |
注册应用程序以处理所有入站配对请求。 |
| TryRegisterForAllInboundPairingRequestsWithProtectionLevel(DevicePairingKinds, DevicePairingProtectionLevel) |
注册应用程序以处理具有指定最低保护级别的所有入站配对请求。 |
| UnpairAsync() |
尝试取消配对设备。 |