public async Task StopAsync(CancellationToken cancellationToken) { if (_syncClient != null) { _logger.LogInformation("Stopping timed synchronizer service..."); await _syncClient.StopAsync(cancellationToken); _clientScope.Dispose(); _clientScope = null; _logger.LogInformation("Stopped synchronizer service"); } else { _logger.LogInformation("Synchronizer service has not been started yet"); } }