public static void Execute() { if (!_initialized) { var cfg = CfgManager.GetCfg(); if (CfgManager.CheckCfg(cfg, out string errorMsg)) { using (Deserializer deserilaizer = new Deserializer()) { var _file = @"D:\home\data\app\cfg\Config.ini"; //var _file = Directory.GetCurrentDirectory() + @"\Config.ini"; deserilaizer.Execute(_file); var plyqor_cfg = ConvertToDictionary(deserilaizer.GetTag("plyqor")); Dictionary <string, Dictionary <string, string> > cfgDictionary = new Dictionary <string, Dictionary <string, string> >(); cfgDictionary.Add("PlyQor", plyqor_cfg); PlyQorManager.Initialize(cfgDictionary); _initialized = true; } } } }
public static void Execute() { using (Deserializer deserilaizer = new Deserializer()) { var _file = Directory.GetCurrentDirectory() + @"\Config.ini"; deserilaizer.Execute(_file); var plyqor_cfg = ConvertToDictionary(deserilaizer.GetTag("plyengine_audit")); var plyclient_cfg = ConvertToDictionary(deserilaizer.GetTag("plyclient_audit")); Dictionary <string, Dictionary <string, string> > cfg = new Dictionary <string, Dictionary <string, string> >(); cfg.Add("PlyQor", plyqor_cfg); PlyQorManager.Initialize(cfg); Configuration.Load(plyclient_cfg); } }