Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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;
            }
        }