Пример #1
0
        public void EndSelect()
        {
            PopBlock();
            CodeSelect select = currentBlock.GetLastItem() as CodeSelect;

            if (select == null)
            {
                throw new InvalidOperationException("'EndSelect' not allowed here");
            }
        }
Пример #2
0
        public void Case(CodeExpression condition)
        {
            PopBlock();
            CodeSelect select = currentBlock.GetLastItem() as CodeSelect;

            if (select == null)
            {
                throw new InvalidOperationException("'Case' not allowed here");
            }

            PushNewBlock();
            select.AddCase(condition, currentBlock);
        }