protected virtual void Dispose(bool disposing) { _rawDevice?.Close(); _rawDevice?.Dispose(); _rawDevice = null; if (disposing) { _peripheralManagerService?.Dispose(); _peripheralManagerService = null; } }
public void Close() { if (_device != null) { try { _device.Close(); } finally { _device = null; } } }
public void DataUpdateStop() { myTimer.Dispose(); i2cDevice.Close(); }