Beispiel #1
0
        // Token: 0x06000055 RID: 85 RVA: 0x000038E8 File Offset: 0x00001AE8
        public static SiteConfig GetSiteInfo(string sitepath)
        {
            SiteConfig siteConfig = FPCache.Get <SiteConfig>("FP_SITECONFIG_" + sitepath);

            lock (SiteConfigs.lockHelper)
            {
                if (siteConfig == null)
                {
                    string mapPath;
                    if (sitepath == "")
                    {
                        mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "site.config");
                    }
                    else if (File.Exists(FPUtils.GetMapPath(WebConfig.WebPath + "sites/" + sitepath + "/site.config")))
                    {
                        mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "sites/" + sitepath + "/site.config");
                    }
                    else if (File.Exists(FPUtils.GetMapPath(WebConfig.WebPath + sitepath + "/site.config")))
                    {
                        mapPath = FPUtils.GetMapPath(WebConfig.WebPath + sitepath + "/site.config");
                    }
                    else
                    {
                        mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "site.config");
                    }
                    if (!File.Exists(mapPath))
                    {
                        FPSerializer.Save <SiteConfig>(mapPath);
                    }
                    FPCache.Insert("FP_SITECONFIG_" + sitepath, SiteConfigs.LoadConfig(mapPath), mapPath);
                    siteConfig = FPCache.Get <SiteConfig>("FP_SITECONFIG_" + sitepath);
                }
            }
            siteConfig.sitepath = sitepath;
            return(siteConfig);
        }