private void ConfigurationReadFailed() { File.Delete(_configurationPath); ConfigurationNotFounded?.Invoke(this, new ConfigurationNotFoundedEventArgs { Message = "Application failed to read the existent configuration file.\nPlease fill the configuration form." }); _logger.LogError( $"Application failed to read existent configuration file at {DateTime.Now:yyyy-MM-dd HH:mm:ss}", LogCriticality.High); }
private bool HandleConfigurationNotFounded() { if (File.Exists(_configurationPath)) { return(false); } ConfigurationNotFounded?.Invoke(this, new ConfigurationNotFoundedEventArgs { Message = "Configuration not founded.\nPlease fill the configuration form." }); _logger.LogError($"Configuration file not founded at {DateTime.Now:yyyy-MM-dd HH:mm:ss}." , LogCriticality.High); return(true); }