/// <summary> /// Loads the Modules Settings represented by the 'ModuleSettings.config' File. /// Called by the Methods 'Helper.GetEditControl()' and 'PortalTab.RenderModules()' /// </summary> internal void LoadModuleSettings() { string path = Config.GetModulePhysicalPath(type) + "ModuleSettings.config"; if(File.Exists(path)) { XmlTextReader xmlReader = new XmlTextReader(path); moduleSettings = (ModuleSettings)ModuleSettings.xmlModuleSettings.Deserialize(xmlReader); xmlReader.Close(); } else { moduleSettings = null; } }
/// <summary> /// Loads the Modules Settings represented by the 'ModuleSettings.config' File. /// Called by the Methods 'Helper.GetEditControl()' and 'PortalTab.RenderModules()' /// </summary> public void LoadModuleSettings() { string path = Config.GetModulePhysicalPath(type) + "ModuleSettings.config"; if (File.Exists(path)) { // Lookup in Cache string msk = "ModuleSettings_" + path; moduleSettings = (ModuleSettings)System.Web.HttpContext.Current.Cache[msk]; if (moduleSettings != null) return; XmlTextReader xmlReader = new XmlTextReader(path); moduleSettings = (ModuleSettings)ModuleSettings.XmlModuleSettings.Deserialize(xmlReader); xmlReader.Close(); // Add to Cache System.Web.HttpContext.Current.Cache.Insert(msk, moduleSettings, new System.Web.Caching.CacheDependency(path)); } else { moduleSettings = null; } }