public static void ParseServerConf(ServerConfInfo sci,String configurationFile) { XmlDocument doc = new XmlDocument(); if (configurationFile == null || configurationFile.Equals(String.Empty)) { doc.Load(sci.ConfPath); } else { doc.Load(configurationFile); } XmlNode rootDirectory = doc.SelectSingleNode("rootDirectory"); if (!rootDirectory.Equals(null)) { sci.RootDirectory = rootDirectory.InnerText; } //后续服务器相关配置可添加于此 }
public static void ReloadRule(ServerConfInfo sci, String configurationFile) { sci = new ServerConfInfo(); ParseServerConf(sci, configurationFile); }