private void LoadConfig() { try { Servers.Clear(); Servers.AddRange(GetAvailabilityGroupList(xml_config, "Servers", "Server", "ServerId")); Proxies.Clear(); Proxies.AddRange(GetAvailabilityGroupList(xml_config, "Proxies", "Proxy", "ProxyId")); } catch (Exception e) { Log.WriteLine(LogLevel.Error, "There are errors in your configuration file."); Log.WriteLine(e.Message); Global.Exit(); } }
/// <summary> /// Safely exit current Trinity instance. Logs will be flushed before exiting. /// </summary> public static void Exit() { Global.Exit(0); }