/// <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);
/// <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);
protected internal virtual SwitchLabel VisitSwitchLabel(SwitchLabel node) => node.Update( VisitLabelTarget(node.Label), VisitPattern(node.Pattern), Visit(node.WhenClause) );