Example #1
0
        private void IterateThroughBlockLists(Block block)
        {
            BlockIterator.ForEach(block, (currentBlock) =>
            {
                // recursion for removal of deep nesting
                object content = currentBlock.GetContent();
                if (content is Block)
                {
                    IterateThroughBlockLists(content as Block);
                    return;
                }

                // we do not want any logic in here
                if (content is PropositionalLogic)
                {
                    return;
                }

                // definitely a string, containing a symbol
                string value = content as string;
                if (!UniqueValues.Contains(value))
                {
                    UniqueValues.Add(value);
                }
            });
        }