public override List <int> EndServiceDiscovery(IAsyncResult ar) { if (_sdpQuery == null) { throw new InvalidOperationException("BeginGetServiceRecords not called"); } var list = _sdpQuery.EndQuery(ar); var portList = BluetoothConnector.ListAllRfcommPortsInRecords(list); return(portList); }
List <int> IUsesBluetoothConnectorImplementsServiceLookup.EndServiceDiscovery(IAsyncResult ar) { if (_sdpQuery == null) { throw new InvalidOperationException("Begin not called."); } var records = _sdpQuery.EndQuery(ar); var ports = BluetoothConnector.ListAllRfcommPortsInRecords(records); return(ports); }