示例#1
0
 /// <summary>
 /// Get the value in the cache for the given key.
 /// </summary>
 /// <param name="key">The key to lookup in the cache.</param>
 /// <returns>The value for the given key.</returns>
 public TValue this[TKey key]
 {
     get
     {
         CacheItem cacheItem = dictionary[key];
         cacheItem.Accessed();
         return(cacheItem.Value);
     }
 }