Refactor using c# 12 features

This commit is contained in:
Tyrrrz
2023-12-10 22:32:45 +02:00
parent 174b92cbb0
commit 619fe9ccf7
30 changed files with 155 additions and 290 deletions

View File

@@ -8,7 +8,8 @@ using Microsoft.Win32;
namespace DiscordChatExporter.Gui.Services;
public partial class SettingsService : SettingsBase
public partial class SettingsService()
: SettingsBase(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Settings.dat"))
{
public bool IsUkraineSupportMessageEnabled { get; set; } = true;
@@ -44,9 +45,6 @@ public partial class SettingsService : SettingsBase
public string? LastAssetsDirPath { get; set; }
public SettingsService()
: base(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Settings.dat")) { }
public override void Save()
{
// Clear the token if it's not supposed to be persisted