private void Reload(CommandArgs args) { if (File.Exists(CEConfigPath)) { CEConfig = CEConfigFile.Read(CEConfigPath); // Add all the missing config properties in the json file } else { CEConfig.Write(CEConfigPath); if (File.Exists(CEConfigPath)) { CEConfig = CEConfigFile.Read(CEConfigPath); // Add all the missing config properties in the json file } } }
private static void SetupConfig() { try { if (File.Exists(CEConfigPath)) { CEConfig = CEConfigFile.Read(CEConfigPath); // Add all the missing config properties in the json file } CEConfig.Write(CEConfigPath); } catch (Exception ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Error in (EPR) config file"); Console.ForegroundColor = ConsoleColor.Gray; Log.Error("(EPR) Config Exception"); Log.Error(ex.ToString()); } }