Assembly: PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 220.127.116.11 (18.104.22.168)
public sealed class InstructionReader : IDisposable
Thetype exposes the following members.
Gets the current instruction.
Gets the InstructionBlock on which the current is positioned.
Gets the InstructionSequence on which the current is positioned.
Determines whether the current instruction is the last of the sequence.
Determines whether resolution of local variable symbols is enabled for the current reader.
Gets the MethodBodyDeclaration to which the current is assigned.
Gets the module to which thisis associates.
Creates a bookmark, thanks to which the currentcan move forward and then return to the current location.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Enters an InstructionBlock.
Enters an InstructionSequence.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Serves as the default hash function.(Inherited from Object.)
Gets the LocalVariableSymbol associated to a given ordinal in the current context.
Gets the LocalVariableSymbol of a local variable given its ordinal and optionally creates default symbol if no symbol is associated to the given ordinal in the current context.
Gets the Type of the current instance.(Inherited from Object.)
Moves the currentto a given bookmark.
Prepares the currentso that it can read a specific block, without assumption on the current state of the .
Leaves the active InstructionBlock, and sets the position of the current to the parent block of the active block.
Leaves the active InstructionSequence, and sets the position of the current to the parent block of the active sequence.
Reads the next instruction of the active InstructionSequence.
Returns a string that represents the current object.(Inherited from Object.)
Each CreateInstructionReader() method to get an instance.instance is assigned to a single method. Developers must use the
When you want to read an instruction block, you first need to enter it using the EnterInstructionBlock(InstructionBlock) method. The EnterInstructionBlock(InstructionBlock) method expect that the active block of the is the parent of the block you want to enter, so you have to enter all ascendant blocks, from the root to the leave, like in a stack model. Then you attach the reader to a sequence using EnterInstructionSequence(InstructionSequence). To read another sequence, you need first to use LeaveInstructionSequence(), then again EnterInstructionSequence(InstructionSequence). Use LeaveInstructionBlock() to leave a block.
If you want to enter a specific block without entering all its ancestors, use the JumpToInstructionBlock(InstructionBlock) method, which will make the proper calls to LeaveInstructionBlock() and EnterInstructionBlock(InstructionBlock) automatically.