2 instantiations of SwitchExpression
System.Linq.Expressions (2)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
945
expr = new
SwitchExpression
(node.Type, switchValue.Node, defaultBody.Node, node.Comparison, cases);
System\Linq\Expressions\SwitchExpression.cs (1)
286
return new
SwitchExpression
(resultType, switchValue, defaultBody, comparison, caseList);
52 references to SwitchExpression
netstandard (1)
netstandard.cs (1)
1024
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
SwitchExpression
))]
System.Core (1)
System.Core.cs (1)
162
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
SwitchExpression
))]
System.Linq.Expressions (50)
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (2)
195
var
@switch = (
SwitchExpression
)node;
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (8)
162
SwitchExpression
node = (
SwitchExpression
)expr;
238
private static Type GetTestValueType(
SwitchExpression
node)
274
internal readonly
SwitchExpression
Node;
281
internal SwitchInfo(
SwitchExpression
node, LocalBuilder value, Label @default)
363
private bool TryEmitSwitchInstruction(
SwitchExpression
node, CompilationFlags flags)
485
private void EmitSwitchCases(
SwitchExpression
node, Label[] labels, bool[] isGoto, Label @default, Label end, CompilationFlags flags)
635
private bool TryEmitHashtableSwitch(
SwitchExpression
node, CompilationFlags flags)
System\Linq\Expressions\Compiler\StackSpiller.cs (2)
879
var
node = (
SwitchExpression
)expr;
System\Linq\Expressions\DebugViewWriter.cs (1)
1047
protected internal override Expression VisitSwitch(
SwitchExpression
node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (2)
417
private readonly
SwitchExpression
_node;
419
public SwitchExpressionProxy(
SwitchExpression
node)
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
721
protected internal override Expression VisitSwitch(
SwitchExpression
node)
System\Linq\Expressions\ExpressionVisitor.cs (5)
477
/// Visits the children of the <see cref="
SwitchExpression
"/>.
482
protected internal virtual Expression VisitSwitch(
SwitchExpression
node)
673
private static
SwitchExpression
ValidateSwitch(
SwitchExpression
before,
SwitchExpression
after)
System\Linq\Expressions\Interpreter\LightCompiler.cs (6)
1529
var
node = (
SwitchExpression
)expr;
1628
private void CompileIntSwitchExpression<T>(
SwitchExpression
node) where T : notnull
1670
private void CompileStringSwitchExpression(
SwitchExpression
node)
1868
var
@switch = (
SwitchExpression
)node;
System\Linq\Expressions\SwitchCase.cs (4)
12
/// Represents one case of a <see cref="
SwitchExpression
"/>.
24
/// Gets the values of this case. This case is selected for execution when the <see cref="
SwitchExpression
.SwitchValue"/> matches any of these values.
67
/// Creates a <see cref="Expressions.SwitchCase"/> for use in a <see cref="
SwitchExpression
"/>.
78
/// Creates a <see cref="Expressions.SwitchCase"/> for use in a <see cref="
SwitchExpression
"/>.
System\Linq\Expressions\SwitchExpression.cs (19)
90
public
SwitchExpression
Update(Expression switchValue, IEnumerable<SwitchCase>? cases, Expression? defaultBody)
106
/// Creates a <see cref="
SwitchExpression
"/>.
110
/// <returns>The created <see cref="
SwitchExpression
"/>.</returns>
111
public static
SwitchExpression
Switch(Expression switchValue, params SwitchCase[]? cases)
117
/// Creates a <see cref="
SwitchExpression
"/>.
122
/// <returns>The created <see cref="
SwitchExpression
"/>.</returns>
123
public static
SwitchExpression
Switch(Expression switchValue, Expression? defaultBody, params SwitchCase[]? cases)
129
/// Creates a <see cref="
SwitchExpression
"/>.
135
/// <returns>The created <see cref="
SwitchExpression
"/>.</returns>
136
public static
SwitchExpression
Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases)
142
/// Creates a <see cref="
SwitchExpression
"/>.
149
/// <returns>The created <see cref="
SwitchExpression
"/>.</returns>
150
public static
SwitchExpression
Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, params SwitchCase[]? cases)
156
/// Creates a <see cref="
SwitchExpression
"/>.
162
/// <returns>The created <see cref="
SwitchExpression
"/>.</returns>
163
public static
SwitchExpression
Switch(Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases)
169
/// Creates a <see cref="
SwitchExpression
"/>.
176
/// <returns>The created <see cref="
SwitchExpression
"/>.</returns>
177
public static
SwitchExpression
Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases)