1
0

refactor: centralize common strings, paths, and default values into a new Constants class.

This commit is contained in:
2026-02-28 15:41:40 +01:00
parent 0577640da9
commit 96ccf0ea9a
13 changed files with 80 additions and 38 deletions

View File

@@ -1,6 +1,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Toak.Core;
using Toak.Serialization;
using Toak.Core.Interfaces;
@@ -8,12 +9,11 @@ namespace Toak.Configuration;
public class ConfigManager : IConfigProvider
{
private readonly string ConfigDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config", "toak");
private readonly string ConfigPath;
private readonly string ConfigDir = Constants.Paths.ConfigDir;
private readonly string ConfigPath = Constants.Paths.ConfigFile;
public ConfigManager()
{
ConfigPath = Path.Combine(ConfigDir, "config.json");
}
public ToakConfig LoadConfig()