/// <summary> /// /// </summary> /// <returns></returns> public IEnumerator <KeyValuePair <Byte[], Byte[]> > GetEnumerator() { using SnapShot sn = this.CreateSnapshot(); using Iterator iterator = this.CreateIterator(new ReadOptions { Snapshot = sn }); iterator.SeekToFirst(); while (iterator.Valid()) { yield return(new KeyValuePair <Byte[], Byte[]>(iterator.Key(), iterator.Value())); iterator.Next(); } }
/// <summary> /// /// </summary> /// <returns></returns> IEnumerator <KeyValuePair <String, String> > IEnumerable <KeyValuePair <String, String> > .GetEnumerator() { using SnapShot sn = this.CreateSnapshot(); using Iterator iterator = this.CreateIterator(new ReadOptions { Snapshot = sn }); iterator.SeekToFirst(); while (iterator.Valid()) { yield return(new KeyValuePair <String, String>(iterator.StringKey(), iterator.StringValue())); iterator.Next(); } }