Exemplo n.º 1
0
        public bool MoveNext()
        {
            zCheckBreakOrSkip();

            if (m_PendingBranch != null)
            {
                m_Branches.Add(m_PendingBranch);
                m_CurrentBranch = m_PendingBranch;
                m_PendingBranch = null;
                m_CurrentPosition++;
                return(true);
            }
            ExecutionBranch.MoveInfo moveInfo;
            while (!(moveInfo = m_CurrentBranch.MoveNext()).Success)
            {
                zOnBranchEnded(new BranchEndedEventArgs(m_CurrentBranch));
                if (m_Branches.Count == 1)
                {
                    return(false);
                }
                m_CurrentBranch.Steps = null;
                m_CurrentBranch.Dispose();
                m_Branches.Remove(m_CurrentBranch);
                m_CurrentBranch = m_Branches[m_Branches.Count - 1];
            }
            m_CurrentPosition++;
            if (moveInfo.CausedIteration)
            {
                m_CurrentPosition -= m_CurrentBranch.RecursiveStepCount();
            }
            return(true);
        }