PERWAPI.CILInstructions.EndInsert C# (CSharp) Method

EndInsert() public method

Stop inserting instructions into the buffer. Any instructions added after this call will go at the end of the instruction buffer. To be used with StartInsert(). This method cannot be called if not in "insert" mode.
public EndInsert ( ) : void
return void
        public void EndInsert()
        {
            if (!inserting)
                throw new Exception("Cannot stop inserting if not in insert mode");
            CILInstruction[] newInsts = buffer;
            buffer = saveBuffer;
            int numNew = tide;
            tide = saveTide;
            int insPos = currI+1;
            if (numReplace > 0) insPos--;
            InsertInstructions(insPos,newInsts,numNew);
            inserting = false;
            numReplace = 0;
        }