public void EndSelect() { PopBlock(); CodeSelect select = currentBlock.GetLastItem() as CodeSelect; if (select == null) { throw new InvalidOperationException("'EndSelect' not allowed here"); } }
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); }