separate configuration storage
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user