public override List <int> EndServiceDiscovery(IAsyncResult ar) { using (ISdpDiscoveryRecordsBuffer recBuf = BtIf.EndServiceDiscovery(ar)) { var portList = new List <int>(); int[] ports = recBuf.Hack_GetPorts(); Utils.MiscUtils.Trace_WriteLine("_GetPorts, got {0} records.", recBuf.RecordCount); #if DEBUG if (ports.Length == 0) { Math.Abs(1); // COVERAGE } else { Math.Abs(1); // COVERAGE } #endif // Do this in reverse order, as Widcomm appears to keep old // (out of date!!) service records around, so we want to // use the newests ones in preference. for (int i = ports.Length - 1; i >= 0; --i) { int cur = ports[i]; portList.Add(cur); }//for return(portList); } }
private ISdpDiscoveryRecordsBuffer EndGetServiceRecordsUnparsedWidcomm(IAsyncResult ar) { WidcommBtInterface iface = m_factory.GetWidcommBtInterface(); ISdpDiscoveryRecordsBuffer wrec = iface.EndServiceDiscovery(ar); return(wrec); }