public void Shutdown() { StopScanning(); if (_service != null) { _service.Dispose(); _service = null; } if (_peripheral != null) { _peripheral.Dispose(); _peripheral = null; } if (_centralManager != null) { _centralManager.Dispose(); _centralManager = null; } if (_dispatchQueue != null) { _dispatchQueue.Dispose(); _dispatchQueue = null; } }
public void Disconnect() { Adapter.Current.DisconnectDevice(this); _nativeDevice.Dispose(); }
/// <summary> /// Discconnect from the device. /// </summary> public void Disconnect() { Adapter.Current.DisconnectDevice(this); _peripheral.Dispose(); }