Exemplo n.º 1
0
        /// <summary>
        /// 全局初始化
        /// </summary>
        private async void Initialization()
        {
            CoreEngine.Current.Logger.Info("主程序引擎:全局初始化开始");
            var fullPath = Path.Combine(CoreEngine.Current.AppRootDirection, @"Config\UpdateConfig.xml");

            CoreEngine.Current.Logger.Info($"主程序引擎:加载升级配置文件,路径:{fullPath}");
            if (!File.Exists(fullPath))
            {
                return;
            }
            GlobalConfig = await XMLUtility.LoadXMLAsync <UpdateModel>(fullPath);

            CreateCosXML();
            //定时器
            CoreEngine.Current.Logger.Info("主程序引擎:设置定时器");
            FWatcher = new WatcherJobUtil();
            FWatcher.Start();
            CoreEngine.Current.Logger.Info("主程序引擎:全局初始化结束");
        }