PostSharp SDK 6.9 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Instruction­Sequence Class

InstructionSequence Class

Represents a sequence of instructions without branches, i.e. the control flow necessarily begins at the beginning of the sequence and ends at the end of the sequence.
Inheritance Hierarchy

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: (
public sealed class InstructionSequence : IBlockExpression, 
	IExpression, IMethodBodyElement, ILinkedListNode<IBlockExpression>

The InstructionSequence type exposes the following members.

Public propertyComment
Gets or sets the comment on this instruction sequence.
Public propertyIsEmpty
Public propertyIsOriginal
Determines whether the current instruction sequence is original, i.e. whether it was unmodified from the original module.
Public propertyMethodBody
Gets the MethodBodyDeclaration to which the current instance is related.
Public propertyToken
Gets the instruction sequence token.
Public methodCheckInstructions
Checks whether the instruction stream can be read.
Public methodDetach
Detaches the current InstructionSequence from its parent InstructionBlock.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRedirect
Redirects to another InstructionSequence all branch targets currently referencing the current InstructionSequence.
Public methodRemove()
Removes the current InstructionSequence from the MethodBodyDeclaration to which it belongs, but does not redirect branching targets.
Public methodRemove(InstructionSequence)
Removes the current InstructionSequence from the MethodBodyDeclaration to which it belongs, and optionally redirects to another InstructionSequence all branching targets to the current InstructionSequence
Public methodSplitAfterReaderPosition
Splits the current sequence after the position of an InstructionReader, and returns a new InstructionSequence containing the second part of the sequence.
Public methodSplitAroundReaderPosition
Splits the current InstructionSequence in maximally three sequences, one containing the instructions before the current instruction of a given InstructionReader, one containing only the current instruction and one containing the instructions after the current instruction.
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
By default, PostSharp only analyzes the normal control flow on the base of branching instructions, i.e. it ignores the control flow caused by exceptions. So it is possible that, in case of exception, the sequence is left from a textWriter point instead of from the last instruction.
See Also