Ejemplo n.º 1
0
 public ConfigProvider()
 {
     if (!File.Exists(configPath))
     {
         Config = Default;
         return;
     }
     try
     {
         LoadConfig();
     }
     catch (Exception e)
     {
         throw new Exception($"Error reading configuration from '{configPath}'", e);
     }
 }
Ejemplo n.º 2
0
 void LoadConfig()
 {
     Config = Json.Load<Config>(configPath);
 }