예제 #1
0
 /// <summary>
 /// Creates a <see cref="SwitchSection"/> that represents a switch statement section.
 /// </summary>
 /// <param name="label">The single label handled by the section.</param>
 /// <param name="statements">The statements in the body of the section.</param>
 /// <returns>The created <see cref="SwitchLabel"/>.</returns>
 public static SwitchSection SwitchSection(SwitchLabel label, params Expression[] statements) =>
 SwitchSection(locals: null, new[] { label }, (IEnumerable <Expression>)statements);
예제 #2
0
 /// <summary>
 /// Creates a <see cref="SwitchSection"/> that represents a switch statement section.
 /// </summary>
 /// <param name="label">The single label handled by the section.</param>
 /// <param name="statements">The statements in the body of the section.</param>
 /// <returns>The created <see cref="SwitchLabel"/>.</returns>
 public static SwitchSection SwitchSection(SwitchLabel label, IEnumerable <Expression> statements) =>
 SwitchSection(locals: null, new[] { label }, statements);
예제 #3
0
 protected internal virtual SwitchLabel VisitSwitchLabel(SwitchLabel node) =>
 node.Update(
     VisitLabelTarget(node.Label),
     VisitPattern(node.Pattern),
     Visit(node.WhenClause)
     );