예제 #1
0
        protected internal override SwitchCaseSlim VisitSwitchCase(SwitchCaseSlim node)
        {
            Append("SwitchCase(");
            Visit(node.Body);
            Append(", ");
            Visit(", ", node.TestValues);
            Append(')');

            return(node);
        }
 /// <summary>
 /// Visits a switch case slim tree node, produces a switch case.
 /// </summary>
 /// <param name="node">Node to visit.</param>
 /// <param name="body">Body expressions.</param>
 /// <param name="testValues">Test value expressions.</param>
 /// <returns>The switch case represented by the switch case slim node.</returns>
 protected override SwitchCase MakeSwitchCase(SwitchCaseSlim node, Expression body, ReadOnlyCollection <Expression> testValues)
 {
     return(_factory.SwitchCase(body, testValues));
 }
예제 #3
0
 /// <summary>
 /// Visits a switch case tree node.
 /// </summary>
 /// <param name="node">Node to visit.</param>
 /// <returns>Result of visiting the node.</returns>
 protected internal virtual SwitchCaseSlim VisitSwitchCase(SwitchCaseSlim node)
 {
     return(node.Update(Visit(node.TestValues), Visit(node.Body)));
 }