Ejemplo n.º 1
0
        public void EndSelect()
        {
            PopBlock();
            CodeSelect select = currentBlock.GetLastItem() as CodeSelect;

            if (select == null)
            {
                throw new InvalidOperationException("'EndSelect' not allowed here");
            }
        }
Ejemplo n.º 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);
        }