Table of Contents

Class BlockTransformContext

Namespace
ICSharpCode.Decompiler.IL.Transforms
Assembly
ICSharpCode.Decompiler.dll

Parameter class holding various arguments for Run(Block, BlockTransformContext).

public class BlockTransformContext : ILTransformContext
Inheritance
BlockTransformContext
Inherited Members

Constructors

BlockTransformContext(ILTransformContext)

public BlockTransformContext(ILTransformContext context)

Parameters

context ILTransformContext

Properties

Block

The block to process.

public Block Block { get; set; }

Property Value

Block

Remarks

Should be identical to the block parameter to IBlockTransform.Run.

ControlFlowGraph

Gets the control flow graph.

Note: the control flow graph is not up-to-date, but was created at the start of the block transforms (before loop detection).

public ControlFlowGraph ControlFlowGraph { get; set; }

Property Value

ControlFlowGraph

ControlFlowNode

The control flow node corresponding to the block being processed.

public ControlFlowNode ControlFlowNode { get; set; }

Property Value

ControlFlowNode

Remarks

Identical to ControlFlowGraph.GetNode(Block). Note: the control flow graph is not up-to-date, but was created at the start of the block transforms (before loop detection).

IndexOfFirstAlreadyTransformedInstruction

Initially equal to Block.Instructions.Count indicating that nothing has been transformed yet. Set by ConditionDetection when another already transformed block is merged into the current block. Subsequent IBlockTransforms must update this value, for example, by resetting it to Block.Instructions.Count. StatementTransform will use this value to skip already transformed instructions.

public int IndexOfFirstAlreadyTransformedInstruction { get; set; }

Property Value

int