private void BuildComparisonGroup()
        {
            var comparisons = new List <ComparisonModel>();

            while (_stack.Count > 0 && (_stack.Peek() is ComparisonModel))
            {
                comparisons.Add((ComparisonModel)_stack.Pop());
            }

            comparisons.Reverse();

            if (comparisons.Count > 0)
            {
                var group = new ComparisonGroup
                {
                    Comparisons = comparisons
                };
                _stack.Push(group);
            }
        }
Ejemplo n.º 2
0
        private void BuildComparisonGroup()
        {
            var comparisons = new List<ComparisonModel>();
            while (_stack.Count > 0 && (_stack.Peek() is ComparisonModel))
            {
                comparisons.Add((ComparisonModel)_stack.Pop());
            }

            comparisons.Reverse();

            if (comparisons.Count > 0)
            {
                var group = new ComparisonGroup
                {
                    Comparisons = comparisons
                };
                _stack.Push(group);
            }
        }