public bool TryGetValue(TKey key, out TValue value) { if (!_localDictionary.TryGetValue(key, out value)) { if (!_persistantDictionary.TryGetValue(key, out value)) { value = default(TValue); return(false); } MakeLocal(key); value = _localDictionary[key]; } return(true); }
public virtual bool TryGetValue(TKey key, out TValue value) { if (_localCache.TryGetValue(key, out value)) { return(true); } if (!_persistantDictionary.TryGetValue(key, out value)) { value = default(TValue); return(false); } MakeLocal(key, value); return(true); }