PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Instruction­Block Class / Instruction­Block Methods

InstructionBlock Methods

The InstructionBlock type exposes the following members.

Methods
  NameDescription
Public methodAddChildBlock
Adds a child block.
Public methodAddExceptionHandlerCatch
Constructs an catchExceptionHandler and add it to the current block.
Public methodAddExceptionHandlerFault
Constructs a FaultExceptionHandler and add it to the current block.
Public methodAddExceptionHandlerFilter
Constructs a FilterExceptionHandler and add it to the current block.
Public methodAddExceptionHandlerFinally
Constructs a finallyExceptionHandler and add it to the current block.
Public methodAddInstructionSequence
Adds an InstructionSequence after a given sequence in the current the block.
Public methodAddLocalConstantSymbol
Public methodAddLocalVariableSymbol
Adds a LocalVariableSymbol to the current InstructionBlock.
Public methodClearCache
Clear the cache (typically mapping to System.Reflection or, if the current element is a reference, to the related definition) of the current Element and all its children.
(Inherited from Element.)
Public methodDefineLocalVariable(ITypeSignature, CommonString)
Creates a new local variable in the current block.
Public methodDefineLocalVariable(ITypeSignature, String)
Creates a new local variable in the current block.
Public methodDelete
Public methodDetach
Detaches the current block from its parent.
Public methodDispose Obsolete.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberFindCommonAncestor
Finds the deepest common ancestor of two blocks in the method body tree.
Public methodFindFirstInstructionSequence
Finds the first InstructionSequence of the tree whose current InstructionBlock is the root.
Public methodFindLastInstructionSequence
Public methodGetChildrenEnumerator()
Gets an enumerator to enumerate children blocks
Public methodGetChildrenEnumerator(Boolean)
Gets an enumerator to enumerate children blocks and allow to enumerate them children of children recursively.
Public methodGetChildrenEnumerator(Boolean, Boolean)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLocalConstantSymbol
Public methodGetLocalVariableSymbol
Gets a LocalVariableSymbol given its position in the current block.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodMoveInstructionBlock
Moves an InstructionBlock from another block into the current one.
Public methodMoveInstructionSequence
Adds an InstructionSequence after a given sequence in the current the block.
Public methodNest()
Inserts a new InstructionBlock between the current block and its parent.
Public methodNest(Boolean)
Public methodNest(Boolean, Boolean)
Inserts a new InstructionBlock between the current block and its parent.
Public methodSplitBlockAfterSequence
Splits the current InstructionBlock in two blocks after an InstructionSequence.
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
Extension Methods
See Also