PostSharp 6.4 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Reflection.​Method­Body Namespace / IBlock­Expression Interface

IBlockExpression Interface

Block containing other blocks or instructions.

Namespace:  PostSharp.Reflection.MethodBody
Assembly:  PostSharp (in PostSharp.dll) Version: 6.4.11.0 (6.4.11.0)
Syntax
C#
public interface IBlockExpression : IExpression, 
	IMethodBodyElement

The IBlockExpression type exposes the following members.

Properties
  NameDescription
Public propertyExceptionHandlerKind
Gets the kind of exception handler of the current block (Catch, None or Finally), or None if the current block is not an exception handler.
Public propertyExceptionHandlers
Gets the collection of exception handlers that protect the block, in which the current block is in the try role.
Public propertyItems
Gets the collection of items in the block.
Public propertyLabel
Gets a string that uniquely identifies the block (inside the current method body) as a possible branching target.
Public propertyLocalVariables
Gets the collection of local variables defined for the current block.
Public propertyMethodBodyElementKind
Gets the kind of syntax element.
(Inherited from IMethodBodyElement.)
Public propertyParentElement
Gets the parent element in the tree.
(Inherited from IMethodBodyElement.)
Public propertyParentExceptionHandler
Gets the parent exception handler in the current block is in the Catch, Filter or Finally role.
Public propertyParentMethodBody
Gets the parent method body.
(Inherited from IMethodBodyElement.)
Public propertyReturnType
Gets the type of the return value of the current expression, or Void if the expression does not return anything (i.e. for pure instructions, for instance a goto or throw instruction).
(Inherited from IExpression.)
Remarks

A block typically contains other blocks or instructions. Blocks that contain instructions also implement the ISequenceExpression interface.

See Also