예제 #1
0
        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());
        }
예제 #2
0
        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);
        }