public void Stop() { if (Central != null) { Central.PeripheralsChanged -= Central_PeripheralsChanged; Central = null; } if (rPeripheral != null) { rPeripheral.StreamReceived -= Peripheral_StreamReceived; if (rPeripheral.Status != PeripheralStatus.Disconnected) { rPeripheral.Stop(); } rPeripheral = null; } if (lPeripheral != null) { lPeripheral.StreamReceived -= Peripheral_StreamReceived; if (lPeripheral.Status != PeripheralStatus.Disconnected) { lPeripheral.Stop(); } lPeripheral = null; } }