-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ConfigurationService.cs
42 lines (35 loc) · 1.2 KB
/
ConfigurationService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2023 Russell Camo (Russkyc).- All Rights Reserved
//
// Unauthorized copying or redistribution of all files, in source and binary forms via any medium
// without written, signed consent from the author is strictly prohibited.
using System.ComponentModel;
using GroomWise.Infrastructure.Configuration.Interfaces;
using Injectio.Attributes;
using Russkyc.Configuration;
namespace GroomWise.Infrastructure.Configuration;
[RegisterSingleton<IConfigurationService, ConfigurationService>]
public class ConfigurationService : ConfigProvider, IConfigurationService
{
public ConfigurationService()
: base("appconfig.json") { }
public bool DarkMode
{
get => GetValue<bool>(nameof(DarkMode));
set => SetValue(nameof(DarkMode), value);
}
public string ColorTheme
{
get => GetValue<string>(nameof(ColorTheme));
set => SetValue(nameof(ColorTheme), value);
}
public string Version
{
get => GetValue<string>(nameof(Version));
set => SetValue(nameof(Version), value);
}
public string AppDataPath
{
get => GetValue<string>(nameof(AppDataPath));
set => SetValue(nameof(AppDataPath), value);
}
}