Beispiel #1
0
        public virtual void Index()
        {
            set("clearLink", to(Clear));
            set("addLink", to(Add));
            set("deleteKeyLink", to(DeleteByKey));
            set("veiwLink", to(ViewCache));

            IDictionaryEnumerator e = _appCache.GetEnumerator();

            IBlock block = getBlock("list");

            set("cacheCount", _appCache.Count);

            int count = 0;

            while (e.MoveNext())
            {
                if (count > 500)
                {
                    break;
                }

                DictionaryEntry entry = e.Entry;

                block.Set("key", entry.Key);
                block.Set("value", "...");
                block.Set("removeLink", to(Remove) + "?key=" + entry.Key.ToString());
                block.Set("viewLink", to(Read) + "?key=" + entry.Key.ToString());
                block.Next();

                count++;
            }
        }