Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Bluetooth LeaderVertizementReceivedEventArgs的一些成员是;COM对象“;而不是文档化的类型_C#_Windows - Fatal编程技术网

C# Bluetooth LeaderVertizementReceivedEventArgs的一些成员是;COM对象“;而不是文档化的类型

C# Bluetooth LeaderVertizementReceivedEventArgs的一些成员是;COM对象“;而不是文档化的类型,c#,windows,C#,Windows,我正在尝试在Windows桌面应用程序中使用Windows.Devices.Bluetooth.Advertision.BluetoothLEAdvertisementWatcher。当接收到BLE播发时,我会得到一个接收到的事件,其中一个参数是BluetoothLeadVertizeTreceivedEventArgs对象 我需要从这些事件参数中获得服务UUID的列表,文档和对象浏览器都显示为IList类型: public IList<Guid> ServiceUuids { ge

我正在尝试在Windows桌面应用程序中使用Windows.Devices.Bluetooth.Advertision.BluetoothLEAdvertisementWatcher。当接收到BLE播发时,我会得到一个接收到的事件,其中一个参数是BluetoothLeadVertizeTreceivedEventArgs对象

我需要从这些事件参数中获得服务UUID的列表,文档和对象浏览器都显示为IList类型:

public IList<Guid> ServiceUuids { get; }
public IList ServiceUuids{get;}
但是,当我的事件处理程序实际执行时,该成员(以及其他几个成员)将显示为System类型。\u ComObject而不是文档化的类型


我假设在非UWP应用程序中使用来自该名称空间的类更为通用?如何访问具有文档类型的成员?

调试器正在告诉您一些您可能不想知道的信息。是的,所有UWP对象实际上都是引擎盖下的COM接口。通常情况下,由于语言投影,它们看起来就像.NET类型。这些特定属性投影为
IList
。但实际上是用本机语言编写的集合类型,在这种情况下是C++。我认为调试器仍然可以为它们处理正常的.NET表达式,如ManufacturerData[0]。我关心的与其说是调试器,不如说是代码运行时发生了什么,但行为是一样的。当我尝试使用ServiceUuids成员时,我得到一个异常,即强制转换无效。不过,你是对的,有些会员遇到了我需要他们的麻烦。我能为那些不知道的成员做些什么吗?