public bool MoveNext()
        {
            while ((current == null || !current.MoveNext()) && index < storeIterator.Count)
            {
                CloseCurrentEnumerator();
                current = nextIterator?.Invoke(storeIterator[index]);
                ++index;
            }

            return(current != null && current.Current.HasValue);
        }
        /// <summary>
        /// Creates a <see cref="List{KeyValuePair}"/> from an <see cref="IKeyValueEnumerator{K, V}"/>
        /// </summary>
        /// <typeparam name="K">Key type</typeparam>
        /// <typeparam name="V">Value type</typeparam>
        /// <param name="enumerator"><see cref="IKeyValueEnumerator{K, V}"/> enumerator</param>
        /// <returns>Return an instance of <see cref="List{KeyValuePair}"/></returns>
        public static List <KeyValuePair <K, V> > ToList <K, V>(this IKeyValueEnumerator <K, V> enumerator)
        {
            List <KeyValuePair <K, V> > list = new List <KeyValuePair <K, V> >();

            while (enumerator.MoveNext())
            {
                if (enumerator.Current.HasValue)
                {
                    list.Add(enumerator.Current.Value);
                }
            }

            enumerator.Dispose();
            return(list);
        }
Example #3
0
 public bool MoveNext()
 => keyValueEnumerator.MoveNext();
Example #4
0
 public bool MoveNext()
 => innerEnumerator.MoveNext();
Example #5
0
 public bool MoveNext()
 => wrapped.MoveNext();
Example #6
0
 public bool MoveNext()
 => enumerator.MoveNext();
 public bool MoveNext()
 => bytesEnumerator.MoveNext();