Beispiel #1
0
        internal static void LoadEnvironment_Global()
        {
            _environmentSetting.Setting_Global = new GlobalSetting();

            XMLReader _reader = new XMLReader();

            _reader.LoadFile(PathUtility.GetApplicationPath(CommonCode.ConfigName.EnvironmentGlobal));
            #region Site
            var _site_id = _reader.FindValue("Site/ID");
            if (string.IsNullOrEmpty(_site_id))
            {
                _site_id = Guid.NewGuid().ToString();
            }
            _environmentSetting.Setting_Global.SiteID   = _site_id;
            _environmentSetting.Setting_Global.SiteName = _reader.FindValue("Site/Name");
            _environmentSetting.Setting_Global.SiteUrl  = _reader.FindValue("Site/Url");
            _environmentSetting.Setting_Global.ErrorUrl = _reader.FindValue("Site/ErrorUrl");
            _environmentSetting.Setting_Global.Debugger = _reader.FindValueAsBool("Site/Debugger", false);
            #endregion
        }