public static void Load(AntConfig config) { var logFile = config.GetData("log") != null ? config.GetData("log").ToObject<string>() : @".\log.xml"; XmlConfigurator.Configure(new System.IO.FileInfo(logFile)); switch (config.GetServerType()) { case "queen": QueenAnt.QueenAnt.Init(config); break; case "ant": Kernel.Init(config); break; } }
public static void Load(AntConfig config) { Loader loader = null; switch (config.GetServerType()) { case "queen": loader = new QueenLoader(); break; case "ant": loader = new AntLoader(); break; } if (loader == null) return; loader._config = config; loader.Load(); }