static int Main(string[] args) { AssemblyName[] assemblies = Assembly.GetEntryAssembly().GetReferencedAssemblies(); foreach (AssemblyName assembly in assemblies) { Assembly.Load(assembly); } Logger.Init(File.ReadAllText(@".\Config\CSLogCfg.xml"), "CS"); _inputHandler = new InputHandler { cmdHandler = HandleInput }; _inputHandler.Start(); CS kernel = CS.instance; ErrorCode eResult = kernel.Initialize(); if (ErrorCode.Success != eResult) { Logger.Error($"Initialize GS fail, error code is {eResult}"); return(0); } eResult = kernel.Start(); if (ErrorCode.Success != eResult) { Logger.Error($"Start GS fail, error code is {eResult}"); return(0); } MainLoop(); _inputHandler.Stop(); return(0); }
private CS() { _instance = this; }