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)
91return 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)
196foreach (SwitchCase c in @switch.Cases)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (3)
460private void DefineSwitchCaseLabel(SwitchCase @case, out Label label, out bool isGoto) 645foreach (SwitchCase c in node.Cases) 667var cases = new ArrayBuilder<SwitchCase>(node.Cases.Count);
System\Linq\Expressions\Compiler\StackSpiller.cs (4)
885ReadOnlyCollection<SwitchCase> cases = node.Cases; 886SwitchCase[]? clone = null; 889SwitchCase @case = cases[i]; 942cases = new ReadOnlyCollection<SwitchCase>(clone);
System\Linq\Expressions\DebugViewWriter.cs (2)
1032protected override SwitchCase VisitSwitchCase(SwitchCase node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (3)
403private readonly SwitchCase _node; 405public SwitchCaseProxy(SwitchCase node) 426public ReadOnlyCollection<SwitchCase> Cases => _node.Cases;
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
85internal static string SwitchCaseToString(SwitchCase node) 713protected override SwitchCase VisitSwitchCase(SwitchCase node)
System\Linq\Expressions\ExpressionVisitor.cs (3)
466/// Visits the children of the <see cref="SwitchCase"/>. 471protected virtual SwitchCase VisitSwitchCase(SwitchCase node)
System\Linq\Expressions\Interpreter\LightCompiler.cs (4)
1605foreach (SwitchCase @case in node.Cases) 1650SwitchCase switchCase = node.Cases[i]; 1694SwitchCase switchCase = node.Cases[i]; 1869foreach (SwitchCase c in @switch.Cases)
System\Linq\Expressions\SwitchCase.cs (7)
50public 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> 72public 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> 83public 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"/>. 18internal SwitchExpression(Type type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, ReadOnlyCollection<SwitchCase> cases) 46/// Gets the collection of <see cref="SwitchCase"/> objects for the switch. 48public ReadOnlyCollection<SwitchCase> Cases { get; } 90public SwitchExpression Update(Expression switchValue, IEnumerable<SwitchCase>? cases, Expression? defaultBody) 111public static SwitchExpression Switch(Expression switchValue, params SwitchCase[]? cases) 113return Switch(switchValue, null, null, (IEnumerable<SwitchCase>?)cases); 123public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, params SwitchCase[]? cases) 125return Switch(switchValue, defaultBody, null, (IEnumerable<SwitchCase>?)cases); 136public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases) 138return Switch(switchValue, defaultBody, comparison, (IEnumerable<SwitchCase>?)cases); 150public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases) 152return Switch(type, switchValue, defaultBody, comparison, (IEnumerable<SwitchCase>?)cases); 163public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases) 177public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases) 182ReadOnlyCollection<SwitchCase> caseList = cases.ToReadOnly(); 219foreach (SwitchCase c in caseList) 254foreach (SwitchCase c in caseList)