コード例 #1
0
        private Stream GetBleStream(IBluetoothLowEnergyDevice device)
        {
            var stream = new BluetoothLowEnergyStream(device, () =>
            {
                _acceptedDevices.Remove(device);
                _adapter.DisconnectDevice(device);
            });

            _acceptedDevices.Add(device);
            return(stream);
        }