예제 #1
0
 public LruCache(int maxEntries)
 {
     if (maxEntries < 1)
     {
         throw new ArgumentException("maxEntries must be greater than zero.");
     }
     MaxEntries = maxEntries;
     cache      = new Dictionary <TKey, LruListItem <TKey, TValue> >();
     lruList    = new LruList <TKey, TValue>();
 }