Exemplo n.º 1
0
        public bool MoveNext()
        {
            if (Orderer.IsDefaultValue())
            {
                Orderer = new Orderer <TItem, TKey, TInnerEnumerator, TComparer>(ref Inner, ref Comparer);
            }

            if (ToYield >= Orderer.Length)
            {
                return(false);
            }

            while (Orderer.SortedUpTo < ToYield)
            {
                Orderer.Advance(ref Comparer);
            }

            var toYield = ToYield;

            Current = Orderer.ElementAt(toYield);
            ToYield++;

            return(true);
        }