separate configuration storage

This commit is contained in:
EugeneTes
2026-01-27 12:10:09 +01:00
parent bbe3a36c90
commit bf34fdfaa0
2 changed files with 75 additions and 1 deletions

View File

@@ -17,8 +17,10 @@ using EpsonPrintService;
StandardKernel kernel = new StandardKernel();
var configPath = ConfigurationPaths.GetConfigPath();
Console.WriteLine($"Loading configuration from: {configPath}");
var config = JsonSerializer.Deserialize<EpsonPrintServiceConfiguration>(
File.ReadAllText("config.json"));
File.ReadAllText(configPath));
kernel.Bind<IDiscoveryService>().To<DiscoveryService>().InSingletonScope();
kernel.Bind<HttpClient>().ToConstant(new HttpClient { Timeout = TimeSpan.FromSeconds(30) }).InSingletonScope();