PostSharp SDK 6.10 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Instruction­Sequence Class / Instruction­Sequence Methods / Instruction­Sequence.​Split­Around­Reader­Position Method

InstructionSequence.SplitAroundReaderPosition Method

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.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public void SplitAroundReaderPosition(
	InstructionReader reader,
	out InstructionSequence sequenceBefore,
	out InstructionSequence sequenceAfter
)

Parameters

reader
Type: PostSharp.Sdk.CodeModel.InstructionReader
InstructionReader positioned in the current InstructionSequence.
sequenceBefore
Type: PostSharp.Sdk.CodeModel.InstructionSequence
Returns a new sequence containing all instructions before the current one, or null if the current instruction is the first one.
sequenceAfter
Type: PostSharp.Sdk.CodeModel.InstructionSequence
Returns a new sequence containing all instructions after the current one, or null if the current instruction is the last one.
Remarks
After having called this method, the current sequence contains only the current instruction of InstructionReader.
See Also