Esempio n. 1
0
 /// <summary>
 /// Returns the Items of the MRU Cache.
 /// </summary>
 /// <returns></returns>
 protected override IEnumerator <KeyValuePair <string, object> > GetEnumerator()
 {
     lock (_locker)
     {
         var e = MruManager.GetEnumerator();
         List <KeyValuePair <string, object> > items = new List <KeyValuePair <string, object> >();
         do
         {
             items.Add(new KeyValuePair <string, object>(
                           ((CacheKey)e.Current.Key).Key, ((CacheEntry)e.Current.Value).Value));
         } while (e.MoveNext());
         return(items.GetEnumerator());
     }
 }