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);
        }
예제 #3
0
 public bool MoveNext()
 => keyValueEnumerator.MoveNext();
예제 #4
0
 public bool MoveNext()
 => innerEnumerator.MoveNext();
예제 #5
0
 public bool MoveNext()
 => wrapped.MoveNext();
예제 #6
0
 public bool MoveNext()
 => enumerator.MoveNext();
 public bool MoveNext()
 => bytesEnumerator.MoveNext();