protected override void Dispose(bool disposing) { base.Dispose(disposing); if (ScannerService == null) { return; } ScannerService.BarcodeDetected -= OnBarcodeDetected; ScannerService.OrientationUpdated -= OnOrientationUpdated; ScannerService.Dispose(); BackgroundNotification.Dispose(); this.Write($"Disposed"); }