2 instantiations of SwitchExpression
System.Linq.Expressions (2)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
945expr = new SwitchExpression(node.Type, switchValue.Node, defaultBody.Node, node.Comparison, cases);
System\Linq\Expressions\SwitchExpression.cs (1)
286return 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)
195var @switch = (SwitchExpression)node;
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (8)
162SwitchExpression node = (SwitchExpression)expr; 238private static Type GetTestValueType(SwitchExpression node) 274internal readonly SwitchExpression Node; 281internal SwitchInfo(SwitchExpression node, LocalBuilder value, Label @default) 363private bool TryEmitSwitchInstruction(SwitchExpression node, CompilationFlags flags) 485private void EmitSwitchCases(SwitchExpression node, Label[] labels, bool[] isGoto, Label @default, Label end, CompilationFlags flags) 635private bool TryEmitHashtableSwitch(SwitchExpression node, CompilationFlags flags)
System\Linq\Expressions\Compiler\StackSpiller.cs (2)
879var node = (SwitchExpression)expr;
System\Linq\Expressions\DebugViewWriter.cs (1)
1047protected internal override Expression VisitSwitch(SwitchExpression node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (2)
417private readonly SwitchExpression _node; 419public SwitchExpressionProxy(SwitchExpression node)
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
721protected internal override Expression VisitSwitch(SwitchExpression node)
System\Linq\Expressions\ExpressionVisitor.cs (5)
477/// Visits the children of the <see cref="SwitchExpression"/>. 482protected internal virtual Expression VisitSwitch(SwitchExpression node) 673private static SwitchExpression ValidateSwitch(SwitchExpression before, SwitchExpression after)
System\Linq\Expressions\Interpreter\LightCompiler.cs (6)
1529var node = (SwitchExpression)expr; 1628private void CompileIntSwitchExpression<T>(SwitchExpression node) where T : notnull 1670private void CompileStringSwitchExpression(SwitchExpression node) 1868var @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)
90public SwitchExpression Update(Expression switchValue, IEnumerable<SwitchCase>? cases, Expression? defaultBody) 106/// Creates a <see cref="SwitchExpression"/>. 110/// <returns>The created <see cref="SwitchExpression"/>.</returns> 111public static SwitchExpression Switch(Expression switchValue, params SwitchCase[]? cases) 117/// Creates a <see cref="SwitchExpression"/>. 122/// <returns>The created <see cref="SwitchExpression"/>.</returns> 123public static SwitchExpression Switch(Expression switchValue, Expression? defaultBody, params SwitchCase[]? cases) 129/// Creates a <see cref="SwitchExpression"/>. 135/// <returns>The created <see cref="SwitchExpression"/>.</returns> 136public 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> 150public 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> 163public 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> 177public static SwitchExpression Switch(Type? type, Expression switchValue, Expression? defaultBody, MethodInfo? comparison, IEnumerable<SwitchCase>? cases)