// Must ALWAYS be called with the owner's write lock held
        public List <CacheItem> SelectItems(SelectItemsQualifier qualifier)
        {
            var ret = new List <CacheItem> ();

            foreach (LinkedListNode <CacheItem> node in dict.Values)
            {
                CacheItem item = node.Value;

                if (qualifier(item))
                {
                    ret.Add(item);
                }
            }

            return(ret);
        }
Esempio n. 2
0
		// Must ALWAYS be called with the owner's write lock held
		public List <CacheItem> SelectItems (SelectItemsQualifier qualifier)
		{
			var ret = new List <CacheItem> ();

			foreach (LinkedListNode <CacheItem> node in dict.Values) {
				CacheItem item = node.Value;
				
				if (qualifier (item))
					ret.Add (item);
			}

			return ret;
		}