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