Class SwitchDetection
- Namespace
- ICSharpCode.Decompiler.IL.ControlFlow
- Assembly
- ICSharpCode.Decompiler.dll
C# switch statements are not necessarily compiled into IL switch instructions (e.g. when the integer values are non-contiguous).
Detect sequences of conditional branches that all test a single integer value, and simplify them into a ILAst switch instruction (which like C# does not require contiguous values).
public class SwitchDetection : IILTransform
- Inheritance
-
SwitchDetection
- Implements
- Inherited Members
Constructors
SwitchDetection()
public SwitchDetection()
Methods
Run(ILFunction, ILTransformContext)
public void Run(ILFunction function, ILTransformContext context)
Parameters
function
ILFunctioncontext
ILTransformContext