public BluetoothIO(IAdapter adapter, SerialIOSettings settings) { Settings = settings; _adapter = adapter; _adapter.DeviceConnectionLost += AdapterOnDeviceConnectionLost; _adapter.DeviceDisconnected += AdapterOnDeviceDisconnected; _adapter.DeviceDiscovered += Adapter_DeviceDiscovered; _adapter.ScanTimeout = Settings.ScanTimeout; }
public BluetoothIO(IBluetoothLE bluetoothLe, IBluetoothLogger logger, Platform platform) { _platform = platform; Settings = new SerialIOSettings(); bluetoothLe.StateChanged += BluetoothLeOnStateChanged; _logger = logger; _adapter = bluetoothLe.Adapter; _adapter.DeviceConnectionLost += AdapterOnDeviceConnectionLost; _adapter.DeviceDisconnected += AdapterOnDeviceDisconnected; _adapter.DeviceDiscovered += Adapter_DeviceDiscovered; _adapter.ScanTimeout = Settings.ScanTimeout; }