public ListDefinition this[string name] { get { HttpContext.Current.Application.Lock(); if (File.GetLastWriteTime(listsDocPath) > fileDate) { Init(); } if (lists.ContainsKey(name)) { return(lists[name]); } XmlNode node = listsDoc.SelectSingleNode("/Lists/List[@Name='" + name + "']"); if (node == null) { lists.Add(name, null); return(null); } ListDefinition list = new ListDefinition((XmlElement)node); lists.Add(name, list); HttpContext.Current.Application.UnLock(); return(list); } }
public string Render(PlaceHolder placeHolder, PageEntry pageEntry, XmlDocument content, Stack <string> placeHolderStack, out bool containsCacheableContent) { ListDefinition list = ListRegistry.Lists[placeHolder.Expression]; if (list == null) { containsCacheableContent = false; return("[No list found named " + placeHolder.Expression + "]"); } return(list.Render(placeHolderStack, out containsCacheableContent)); }
public ListDefinition this[string name] { get { HttpContext.Current.Application.Lock(); if (File.GetLastWriteTime(listsDocPath) > fileDate) Init(); if (lists.ContainsKey(name)) return lists[name]; XmlNode node = listsDoc.SelectSingleNode("/Lists/List[@Name='" + name + "']"); if (node == null) { lists.Add(name, null); return null; } ListDefinition list = new ListDefinition((XmlElement)node); lists.Add(name, list); HttpContext.Current.Application.UnLock(); return list; } }