public bool TryFind(K key, Lookup direction, out KeyValuePair <K, SortedMap <K, V> > value)
 {
     lock (_syncRoot) {
         value = default(KeyValuePair <K, SortedMap <K, V> >);
         KeyValuePair <long, LazyValue> tmp;
         if (!_chunksCache.TryFind(ToInt64(key), direction, out tmp))
         {
             return(false);
         }
         value = new KeyValuePair <K, SortedMap <K, V> >(FromInt64(tmp.Key), tmp.Value.Value);
         _lastAccessedElement = value;
         return(true);
     }
 }
Beispiel #2
0
        public bool TryFind(K key, Lookup direction, out KeyValuePair <K, Vdest> value)
        {
            KeyValuePair <K, Vsrc> srcVal;
            var res = _innerMap.TryFind(key, direction, out srcVal);

            if (res)
            {
                value = new KeyValuePair <K, Vdest>(srcVal.Key, _srcToDest(srcVal.Value));
            }
            else
            {
                value = default(KeyValuePair <K, Vdest>);
            }
            return(res);
        }