// 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); }
// 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; }