示例#1
0
 public IEnumerable <KeyValuePair <byte[], byte[]> > Filter(IFilter filter)
 {
     foreach (var file in m_versionSet.Files)
     {
         if (filter.Compare(file.Smallest.UserKey) >= 0 && filter.Compare(file.Largest.UserKey) <= 0)
         {
             file.AssureOpen(m_path, m_sharedCache);
             foreach (var item in file.Filter(filter))
             {
                 yield return(item);
             }
         }
     }
 }
示例#2
0
 public IEnumerable <KeyValuePair <byte[], byte[]> > Match(IFilter filter)
 {
     for (int i = 0; i < m_keys.Count; ++i)
     {
         if (filter.Compare(m_keys[i]) == 0)
         {
             yield return(new KeyValuePair <byte[], byte[]>(m_keys[i], m_values[i]));
         }
     }
 }
示例#3
0
        public IEnumerable <KeyValuePair <byte[], byte[]> > Filter(IFilter filter, byte[] largest)
        {
            int count = m_keys.Count;

            for (int i = 0; i < count; ++i)
            {
                if (filter.Compare(m_keys[i]) <= 0)
                {
                    yield return(new KeyValuePair <byte[], byte[]>(m_keys[i], m_values[i]));
                }
            }
        }