Example #1
0
        private void writeChildCollection(Section collection, int counter)
        {
            _depth++;

            // Just getting some vertical spacing for legibility
            if (counter > 1)
            {
                _writer.WriteLine();
            }

            writeSectionHeader(collection);
            foreach (var cell in collection.ActiveCells)
            {
                write($"-> {cell.Key} = {cell.Value}");
            }



            if (collection.IsTabular() && collection.Children.Count > 1)
            {
                writeTableData(collection);
            }
            else
            {
                foreach (var child in collection.Children)
                {
                    if (child is Comment)
                    {
                        child.As <Comment>().WriteText(_depth * 4, _writer);
                    }
                    else
                    {
                        writeStep(child.As <Step>());
                    }
                }
            }

            _depth--;
        }
        private void writeChildCollection(Section collection, int counter)
        {
            _depth++;

            // Just getting some vertical spacing for legibility
            if (counter > 1)
            {
                _writer.WriteLine();
            }

            writeSectionHeader(collection);
            foreach (var cell in collection.ActiveCells)
            {
                write($"-> {cell.Key} = {cell.Value}");
            }



            if (collection.IsTabular() && collection.Children.Count > 1)
            {
                writeTableData(collection);
            }
            else
            {
                foreach (var child in collection.Children)
                {
                    if (child is Comment)
                    {
                        child.As<Comment>().WriteText(_depth * 4, _writer);
                    }
                    else
                    {
                        writeStep(child.As<Step>());
                    }
                }
            }

            _depth--;
        }