public bool TryGetValue(TKey key, out TimedValue <TValue> value, bool updateAccessTime = true) { TimedValue <TValue> timedValue; if (!_dict.TryGetValue(key, out timedValue)) { value = null; return(false); } if (updateAccessTime) { timedValue.UpdateAccessTime(); } value = timedValue; return(true); }
public TValue this[TKey key] { get { return(_dict[key].Value); } set { _dict[key] = new TimedValue <TValue>(value, DefaultExpiry); } }