/// <summary>
 /// Moves this enumerator to the next edge.
 /// </summary>
 /// <returns>True if there is data available.</returns>
 public bool MoveNext()
 {
     if (_edgeEnumerator != null)
     {
         return(_edgeEnumerator.MoveNext());
     }
     return(_enumerator.MoveNext());
 }
        public bool MoveNext()
        {
            if (!_firstEdge)
            {
                while (_vertexEnumerator.MoveNext())
                {
                    while (_graphEnumerator.MoveTo(_vertexEnumerator.Current))
                    {
                        if (!_graphEnumerator.MoveNext())
                        {
                            break;
                        }

                        _firstEdge = true;
                        return(true);
                    }
                }

                return(false);
            }

            while (true)
            {
                if (_graphEnumerator.MoveNext())
                {
                    return(true);
                }

                if (!_vertexEnumerator.MoveNext())
                {
                    return(false);
                }
                while (_graphEnumerator.MoveTo(_vertexEnumerator.Current))
                {
                    if (_graphEnumerator.MoveNext())
                    {
                        return(true);
                    }
                    if (!_vertexEnumerator.MoveNext())
                    {
                        return(false);
                    }
                }
            }
        }