public static List <SiteConfig> GetSiteList() { object obj = FPCache.Get("FP_SITELIST"); List <SiteConfig> list = new List <SiteConfig>(); if (obj != null) { return(obj as List <SiteConfig>); } return(new List <SiteConfig>()); }
public static List <ViewConfig> GetViewList() { object obj = FPCache.Get("FP_VIEWLIST"); List <ViewConfig> list = new List <ViewConfig>(); if (obj != null) { list = (obj as List <ViewConfig>); } else { string mapPath = FPFile.GetMapPath(WebConfig.WebPath + "config/view.config"); list = FPXml.LoadList <ViewConfig>(mapPath); FPCache.Insert("FP_VIEWLIST", list, mapPath); } return(list); }
// 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); }
// Token: 0x06000024 RID: 36 RVA: 0x00003260 File Offset: 0x00001460 public static T Get <T>(string key) { object obj = FPCache.Get(key); return((obj == null) ? default(T) : ((T)((object)obj))); }