tiny refactor

This commit is contained in:
Robert McRackan 2020-08-13 09:53:29 -04:00
parent 8ab2af1c5d
commit b7d96ae447
2 changed files with 8 additions and 7 deletions

View File

@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>3.1.12.70</Version>
<Version>3.1.12.80</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -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)