Exemplo n.º 1
0
        private static void CheckConfig()
        {
            log.Add("Checking Configurations");
            DatabaseConfiguration dbConf      = new DatabaseConfiguration();
            CleanerConfiguration  cleanerConf = new CleanerConfiguration();

            if (!serverConfig.IsAvailable())
            {
                log.Add("Server configuration not present. Applying default settings.");
                serverConfig.Setup();
            }

            if (!dbConf.IsAvailable())
            {
                log.Add("Database configuration not present. Applying default settings.");
                dbConf.Setup();
            }

            if (!cleanerConf.IsAvailable())
            {
                log.Add("Cleaner configuration not present. Applying default settings.");
                cleanerConf.Setup();
            }
        }
Exemplo n.º 2
0
 public CleanerService(IOptions <CleanerConfiguration> options, IUserInput userInput)
 {
     _config    = options.Value;
     _userInput = userInput;
 }