Exemplo n.º 1
0
        public virtual ICodeNode VisitSwitchStatement(SwitchStatement node)
        {
            node.Condition = (Expression)Visit(node.Condition);
            SwitchCaseCollection nodeCases = new SwitchCaseCollection();

            foreach (SwitchCase @case in node.Cases)
            {
                nodeCases.Add(@case);
            }
            node.Cases = (SwitchCaseCollection)Visit(nodeCases);
            return(node);
        }
 public virtual ICodeNode VisitSwitchStatement(SwitchStatement node)
 {
     node.set_Condition((Expression)this.Visit(node.get_Condition()));
     V_0 = new SwitchCaseCollection();
     V_1 = node.get_Cases().GetEnumerator();
     try
     {
         while (V_1.MoveNext())
         {
             V_2 = V_1.get_Current();
             V_0.Add(V_2);
         }
     }
     finally
     {
         if (V_1 != null)
         {
             V_1.Dispose();
         }
     }
     node.set_Cases((SwitchCaseCollection)this.Visit(V_0));
     return(node);
 }