From b7d96ae44788a55cac08fa412ab644e703556308 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Thu, 13 Aug 2020 09:53:29 -0400 Subject: [PATCH] tiny refactor --- LibationLauncher/LibationLauncher.csproj | 2 +- LibationLauncher/UNTESTED/Program.cs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index 2cfe8720..e544dd64 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 3.1.12.70 + 3.1.12.80 diff --git a/LibationLauncher/UNTESTED/Program.cs b/LibationLauncher/UNTESTED/Program.cs index 0cbd90ad..d9023eac 100644 --- a/LibationLauncher/UNTESTED/Program.cs +++ b/LibationLauncher/UNTESTED/Program.cs @@ -33,6 +33,12 @@ namespace LibationLauncher private static void createSettings() { + static bool configSetupIsComplete(Configuration config) + => config.FilesExist + && !string.IsNullOrWhiteSpace(config.LocaleCountryCode) + && !string.IsNullOrWhiteSpace(config.DownloadsInProgressEnum) + && !string.IsNullOrWhiteSpace(config.DecryptInProgressEnum); + var config = Configuration.Instance; if (configSetupIsComplete(config)) return; @@ -70,11 +76,6 @@ namespace LibationLauncher Environment.Exit(0); } - private static bool configSetupIsComplete(Configuration config) - => config.FilesExist - && !string.IsNullOrWhiteSpace(config.LocaleCountryCode) - && !string.IsNullOrWhiteSpace(config.DownloadsInProgressEnum) - && !string.IsNullOrWhiteSpace(config.DecryptInProgressEnum); private static string defaultLoggingLevel { get; } = "Information"; private static void ensureLoggingConfig() @@ -169,7 +170,7 @@ namespace LibationLauncher // CONFIGURATION-DRIVEN (json) var configuration = new ConfigurationBuilder() - .AddJsonFile(config.SettingsJsonPath) + .AddJsonFile(config.SettingsFilePath) .Build(); Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(configuration)