2 instantiations of SwitchCase
System.Linq.Expressions (2)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
922
@case = new
SwitchCase
(body.Node, testValues);
System\Linq\Expressions\SwitchCase.cs (1)
91
return new
SwitchCase
(body, values);
50 references to SwitchCase
netstandard (1)
netstandard.cs (1)
1023
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
SwitchCase
))]
System.Core (1)
System.Core.cs (1)
161
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
SwitchCase
))]
System.Linq.Expressions (48)
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (1)
196
foreach (
SwitchCase
c in @switch.Cases)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (3)
460
private void DefineSwitchCaseLabel(
SwitchCase
@case, out Label label, out bool isGoto)
645
foreach (
SwitchCase
c in node.Cases)
667
var cases = new ArrayBuilder<
SwitchCase
>(node.Cases.Count);
System\Linq\Expressions\Compiler\StackSpiller.cs (4)
885
ReadOnlyCollection<
SwitchCase
> cases = node.Cases;
886
SwitchCase
[]? clone = null;
889
SwitchCase
@case = cases[i];
942
cases = new ReadOnlyCollection<
SwitchCase
>(clone);
System\Linq\Expressions\DebugViewWriter.cs (2)
1032
protected override
SwitchCase
VisitSwitchCase(
SwitchCase
node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (3)
403
private readonly
SwitchCase
_node;
405
public SwitchCaseProxy(
SwitchCase
node)
426
public ReadOnlyCollection<
SwitchCase
> Cases => _node.Cases;
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
85
internal static string SwitchCaseToString(
SwitchCase
node)
713
protected override
SwitchCase
VisitSwitchCase(
SwitchCase
node)
System\Linq\Expressions\ExpressionVisitor.cs (3)
466
/// Visits the children of the <see cref="
SwitchCase
"/>.
471
protected virtual
SwitchCase
VisitSwitchCase(
SwitchCase
node)
System\Linq\Expressions\Interpreter\LightCompiler.cs (4)
1605
foreach (
SwitchCase
@case in node.Cases)
1650
SwitchCase
switchCase = node.Cases[i];
1694
SwitchCase
switchCase = node.Cases[i];
1869
foreach (
SwitchCase
c in @switch.Cases)
System\Linq\Expressions\SwitchCase.cs (7)
50
public
SwitchCase
Update(IEnumerable<Expression> testValues, Expression body)
67
/// Creates a <see cref="Expressions.
SwitchCase
"/> for use in a <see cref="SwitchExpression"/>.
71
/// <returns>The created <see cref="Expressions.
SwitchCase
"/>.</returns>
72
public static
SwitchCase
SwitchCase(Expression body, params Expression[] testValues)
78
/// Creates a <see cref="Expressions.
SwitchCase
"/> for use in a <see cref="SwitchExpression"/>.
82
/// <returns>The created <see cref="Expressions.
SwitchCase
"/>.</returns>
83
public static
SwitchCase
SwitchCase(Expression body, IEnumerable<Expression> testValues)
System\Linq\Expressions\SwitchExpression.cs (18)
13
/// Represents a control expression that handles multiple selections by passing control to a <see cref="
SwitchCase
"/>.
18
internal SwitchExpression(Type type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, ReadOnlyCollection<
SwitchCase
> cases)
46
/// Gets the collection of <see cref="
SwitchCase
"/> objects for the switch.
48
public ReadOnlyCollection<
SwitchCase
> Cases { get; }
90
public SwitchExpression Update(Expression switchValue, IEnumerable<
SwitchCase
>? cases, Expression? defaultBody)
111
public static SwitchExpression Switch(Expression switchValue, params
SwitchCase
[]? cases)
113
return Switch(switchValue, null, null, (IEnumerable<
SwitchCase
>?)cases);
123
public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, params
SwitchCase
[]? cases)
125
return Switch(switchValue, defaultBody, null, (IEnumerable<
SwitchCase
>?)cases);
136
public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params
SwitchCase
[]? cases)
138
return Switch(switchValue, defaultBody, comparison, (IEnumerable<
SwitchCase
>?)cases);
150
public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params
SwitchCase
[]? cases)
152
return Switch(type, switchValue, defaultBody, comparison, (IEnumerable<
SwitchCase
>?)cases);
163
public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<
SwitchCase
>? cases)
177
public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<
SwitchCase
>? cases)
182
ReadOnlyCollection<
SwitchCase
> caseList = cases.ToReadOnly();
219
foreach (
SwitchCase
c in caseList)
254
foreach (
SwitchCase
c in caseList)