Example #1
0
        private bool _MoveNext()
        {
            if (_joinEnumerator.MoveNext())
            {
                Current = _joinEnumerator.Current;

                return true;
            }

            Current = _firstValue;

            _firstValue = default;

            _moveNext = () =>
            {
                if (InnerEnumerator.MoveNext())
                {
                    Current = InnerEnumerator.Current;

                    return true;
                }

                return false;
            };

            return true;
        }
Example #2
0
        private void _MoveNext()
        {
            if (InnerEnumerator.MoveNext())

                _updateEnumerator();

            _completed = true;

            _subEnumerator = null;
        }
            private bool _MoveNext()
            {
                if (InnerEnumerator.MoveNext())
                {
                    _updateEnumerator();

                    return true;
                }

                _subEnumerator = null;

                return false;
            }
Example #4
0
        private void InitDelegate() => _moveNext = () =>
        {
            if (InnerEnumerator.MoveNext())
            {
                _firstValue = InnerEnumerator.Current;

                _moveNext = () => _MoveNext();

                return _MoveNext();
            }

            else

                return false;
        };
Example #5
0
        /// <inheritdoc/>
        public bool MoveNext()
        {
            bool success = InnerEnumerator.MoveNext();

            if (success)
            {
                Index++;
            }
            else
            {
                _endOfSequence = true;
            }

            return(success);
        }
Example #6
0
        private bool _MoveNext()
        {
            while (InnerEnumerator.MoveNext())
            {
                if ((_currentEnumerator = InnerEnumerator.Current.GetEnumerator()).MoveNext())
                {
                    _moveNext = () => _currentEnumerator.MoveNext() || _MoveNext();

                    return(true);
                }
            }

            _moveNext = null;

            return(false);
        }
            private bool _MoveNext()
            {
                if (_joinEnumerator.MoveNext())
                {
#if !WinCopies3
Current
#else
                    _current
#endif
                    = _joinEnumerator.Current;

                    return true;
                }

#if !WinCopies3
Current
#else
                _current
#endif
                = _firstValue;

                _firstValue = default;

                _moveNext = () =>
                {
                    if (InnerEnumerator.MoveNext())
                    {
#if !WinCopies3
Current
#else
                    _current
#endif
                    = InnerEnumerator.Current;

                        return true;
                    }

                    return false;
                };

                return true;
            }
Example #8
0
        public WMIItemInfoEnumerator(IEnumerable <ManagementBaseObject> enumerable, bool resetEnumerator, WMIItemType itemWMIItemType, bool catchExceptions) : base(enumerable)
        {
            _resetInnerEnumerator = resetEnumerator;

            ItemWMIItemType = itemWMIItemType;

            if (catchExceptions)
            {
                _func = () =>
                {
                    while (InnerEnumerator.MoveNext())
                    {
                        try
                        {
                            _MoveNext();

                            return(true);
                        }
                        catch (Exception) { }
                    }

                    return(false);
                }
            }
            ;

            else
            {
                _func = () =>
                {
                    if (InnerEnumerator.MoveNext())
                    {
                        _MoveNext();

                        return(true);
                    }

                    return(false);
                }
            };
        }
Example #9
0
 public bool MoveNext()
 {
     return(InnerEnumerator.MoveNext());
 }