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); }
public bool MoveNext() => keyValueEnumerator.MoveNext();
public bool MoveNext() => innerEnumerator.MoveNext();
public bool MoveNext() => wrapped.MoveNext();
public bool MoveNext() => enumerator.MoveNext();
public bool MoveNext() => bytesEnumerator.MoveNext();