1 write to Cases
System.Linq.Expressions (1)
System\Linq\Expressions\SwitchExpression.cs (1)
24Cases = cases;
38 references to Cases
System.Linq.Expressions (38)
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (1)
196foreach (SwitchCase c in @switch.Cases)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (21)
164if (node.Cases.Count == 0) 211var labels = new Label[node.Cases.Count]; 212var isGoto = new bool[node.Cases.Count]; 213for (int i = 0, n = node.Cases.Count; i < n; i++) 215DefineSwitchCaseLabel(node.Cases[i], out labels[i], out isGoto[i]); 216foreach (Expression test in node.Cases[i].TestValues) 244return node.Cases[0].TestValues[0].Type; 375!TypeUtils.AreEquivalent(type, node.Cases[0].TestValues[0].Type)) 382if (!node.Cases.All(c => c.TestValues.All(t => t is ConstantExpression))) 392var labels = new Label[node.Cases.Count]; 393var isGoto = new bool[node.Cases.Count]; 397for (int i = 0; i < node.Cases.Count; i++) 399DefineSwitchCaseLabel(node.Cases[i], out labels[i], out isGoto[i]); 401foreach (ConstantExpression test in node.Cases[i].TestValues) 491for (int i = 0, n = node.Cases.Count; i < n; i++) 501EmitExpressionAsType(node.Cases[i].Body, node.Type, flags); 645foreach (SwitchCase c in node.Cases) 667var cases = new ArrayBuilder<SwitchCase>(node.Cases.Count); 671for (int i = 0, n = node.Cases.Count; i < n; i++) 673foreach (ConstantExpression t in node.Cases[i].TestValues) 684cases.UncheckedAdd(Expression.SwitchCase(node.Cases[i].Body, new TrueReadOnlyCollection<Expression>(Utils.Constant(i))));
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
885ReadOnlyCollection<SwitchCase> cases = node.Cases;
System\Linq\Expressions\DebugViewWriter.cs (1)
1053Visit(node.Cases, VisitSwitchCase);
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
426public ReadOnlyCollection<SwitchCase> Cases => _node.Cases;
System\Linq\Expressions\ExpressionVisitor.cs (1)
488Visit(node.Cases, VisitSwitchCase),
System\Linq\Expressions\Interpreter\LightCompiler.cs (10)
1531if (node.Cases.All(c => c.TestValues.All(t => t is ConstantExpression))) 1533if (node.Cases.Count == 0) 1605foreach (SwitchCase @case in node.Cases) 1648for (int i = 0; i < node.Cases.Count; i++) 1650SwitchCase switchCase = node.Cases[i]; 1661if (i < node.Cases.Count - 1) 1692for (int i = 0; i < node.Cases.Count; i++) 1694SwitchCase switchCase = node.Cases[i]; 1715if (i < node.Cases.Count - 1) 1869foreach (SwitchCase c in @switch.Cases)
System\Linq\Expressions\SwitchExpression.cs (2)
87/// <param name="cases">The <see cref="Cases"/> property of the result.</param> 94if (ExpressionUtils.SameElements(ref cases, Cases))