Пример #1
0
 static Runtime()
 {
     IsDevelopping = true;
     SiteInfo = new SiteInfo();
     SqlConfig = new SqlConfig();
     Plugins = new List<PluginInfo>();
 }
        public static SiteInfo GetSiteInfo()
        {
            if (SiteInfo != null)
                return SiteInfo;

            string path=AppDomain.CurrentDomain.BaseDirectory + "/Configs/SiteInfo.config";
            if (File.Exists(path))
                SiteInfo = DataConverter.JsonToObject<SiteInfo>(File.ReadAllText(path, Encoding.UTF8));
            else
                SiteInfo = new SiteInfo();
            return SiteInfo;
        }