ServiceRecord[] IBluetoothDeviceInfo.EndGetServiceRecords(IAsyncResult asyncResult) { if (_sdpQuery == null) { throw new InvalidOperationException("Need a previous call to BeginGetServiceRecords."); } var list = _sdpQuery.EndQuery(asyncResult); return(list.ToArray()); }
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); }