tiny refactor
This commit is contained in:
parent
8ab2af1c5d
commit
b7d96ae447
@ -13,7 +13,7 @@
|
|||||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|
||||||
<Version>3.1.12.70</Version>
|
<Version>3.1.12.80</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -33,6 +33,12 @@ namespace LibationLauncher
|
|||||||
|
|
||||||
private static void createSettings()
|
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;
|
var config = Configuration.Instance;
|
||||||
if (configSetupIsComplete(config))
|
if (configSetupIsComplete(config))
|
||||||
return;
|
return;
|
||||||
@ -70,11 +76,6 @@ namespace LibationLauncher
|
|||||||
Environment.Exit(0);
|
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 string defaultLoggingLevel { get; } = "Information";
|
||||||
private static void ensureLoggingConfig()
|
private static void ensureLoggingConfig()
|
||||||
@ -169,7 +170,7 @@ namespace LibationLauncher
|
|||||||
|
|
||||||
// CONFIGURATION-DRIVEN (json)
|
// CONFIGURATION-DRIVEN (json)
|
||||||
var configuration = new ConfigurationBuilder()
|
var configuration = new ConfigurationBuilder()
|
||||||
.AddJsonFile(config.SettingsJsonPath)
|
.AddJsonFile(config.SettingsFilePath)
|
||||||
.Build();
|
.Build();
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
.ReadFrom.Configuration(configuration)
|
.ReadFrom.Configuration(configuration)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user