예제 #1
0
        /// <summary>
        /// Advances the enumerator to the next element of the collection.
        /// </summary>
        /// <returns>
        /// True if the enumerator was successfully advanced to the next
        /// element; false if the enumerator has passed the end of the
        /// collection.
        /// </returns>
        public override Boolean MoveNext()
        {
            if (_InternalEnumerator == null)
            {
                return(false);
            }

            while (_InternalEnumerator.MoveNext())
            {
                _Pipe.SetSource(new SingleEnumerator <S>(_InternalEnumerator.Current));

                if (_Pipe.MoveNext())
                {
                    while (_Pipe.MoveNext())
                    {
                    }

                    _CurrentElement = _InternalEnumerator.Current;

                    return(true);
                }
            }

            return(false);
        }