GetKeyValueIterator() public method

Return an iterator that will return keys and values as a System.Collections.Generic.KeyValuePair{T, T}.
public GetKeyValueIterator ( ByteRangeParams ps ) : ByteKeyValueIterator
ps ByteRangeParams The parameters of iteration, as a .
return ByteKeyValueIterator
Esempio n. 1
0
 public void PrintByNick(string prefix)
 {
     foreach (KeyValuePair <string, string> kv in tableByNick.GetKeyValueIterator(new StringRangeParams().Prefix(prefix)))
     {
         System.Console.WriteLine(kv.Key + " => " + kv.Value);
     }
 }
Esempio n. 2
0
        public void PerformListTest(Table tbl, StringRangeParams ps, uint expected)
        {
            int cnt;

            cnt = 0;
            foreach (String key in tbl.GetKeyIterator(ps))
            {
                //Console.WriteLine(key);
                cnt++;
            }
            Console.WriteLine("Expecting {0}, received {1}", expected, cnt);
            Assert.IsTrue(expected == cnt);

            cnt = 0;
            foreach (KeyValuePair<string, string> kv in tbl.GetKeyValueIterator(ps))
            {
                cnt++;
            }
            Console.WriteLine("Expecting {0}, received {1}", expected, cnt);
            Assert.IsTrue(expected == cnt);
        }