Class ExceptionHandlerBlock<TInstruction>
- Namespace
- Echo.ControlFlow.Blocks
- Assembly
- Echo.ControlFlow.dll
Represents a block of region that is protected by a set of exception handler blocks.
public class ExceptionHandlerBlock<TInstruction> : IBlock<TInstruction> where TInstruction : notnull
Type Parameters
TInstructionThe type of instructions stored in the blocks.
- Inheritance
-
ExceptionHandlerBlock<TInstruction>
- Implements
-
IBlock<TInstruction>
- Inherited Members
Properties
Handlers
Gets a collection of handler blocks.
public IList<HandlerBlock<TInstruction>> Handlers { get; }
Property Value
- IList<HandlerBlock<TInstruction>>
ProtectedBlock
Gets the protected block.
public ScopeBlock<TInstruction> ProtectedBlock { get; }
Property Value
- ScopeBlock<TInstruction>
Tag
Gets or sets a user-defined tag that is assigned to this block.
public object? Tag { get; set; }
Property Value
Methods
AcceptVisitor(IBlockVisitor<TInstruction>)
Visit the current block using the provided visitor.
public void AcceptVisitor(IBlockVisitor<TInstruction> visitor)
Parameters
visitorIBlockVisitor<TInstruction>The visitor to accept.
AcceptVisitor<TState, TResult>(IBlockVisitor<TInstruction, TState, TResult>, TState)
Visit the current block using the provided visitor.
public TResult AcceptVisitor<TState, TResult>(IBlockVisitor<TInstruction, TState, TResult> visitor, TState state)
Parameters
visitorIBlockVisitor<TInstruction, TState, TResult>The visitor to accept.
stateTStateAn argument to pass onto the visitor.
Returns
- TResult
Type Parameters
TStateTResult
GetAllBlocks()
Gets an ordered collection of all basic blocks that can be found in this block.
public IEnumerable<BasicBlock<TInstruction>> GetAllBlocks()
Returns
- IEnumerable<BasicBlock<TInstruction>>
The ordered basic blocks.
GetFirstBlock()
Gets the first basic block that appears in the ordered list of blocks.
public BasicBlock<TInstruction>? GetFirstBlock()
Returns
- BasicBlock<TInstruction>
The first basic block, or
nullif the block contains no basic blocks..
GetLastBlock()
Gets the last basic block that appears in the ordered list of blocks.
public BasicBlock<TInstruction>? GetLastBlock()
Returns
- BasicBlock<TInstruction>
The last basic block, or
nullif the block contains no basic blocks..
ToString()
public override string ToString()