private void AutoRestore()
        {
            if (IsStopped())
            {
                return;
            }

            var configurations = backup.GetAllConfigurations();

            if (configurations.Any())
            {
                var success = TryRestoreAll(configurations);

                if (success == true)
                {
                    systemConfigurationUpdate.ExecuteAsync();
                }
                else if (success == false)
                {
                    Task.Delay(timeout_ms).ContinueWith((_) => AutoRestore());
                }
                else
                {
                    logger.Info("Auto-restore mechanism was aborted.");
                }
            }
            else
            {
                lock (@lock)
                {
                    running = false;
                    logger.Info("Nothing to restore, stopped auto-restore mechanism.");
                }
            }
        }
 private void ServiceHost_SystemConfigurationUpdateRequested()
 {
     logger.Info("Received request to initiate system configuration update.");
     systemConfigurationUpdate.ExecuteAsync();
 }