protected override void InsertRange(int index, ITextLine[] linesToInsert) { Utf8GapStorageLine[] linesToInsert2 = new Utf8GapStorageLine[linesToInsert.Length]; for (int i = 0; i < linesToInsert.Length; i++) { if (!(linesToInsert[i] is Utf8GapStorageLine)) { throw new ArgumentException(); } linesToInsert2[i] = (Utf8GapStorageLine)linesToInsert[i]; } for (int i = 0; i < linesToInsert2.Length; i++) { Insert(index + i, linesToInsert2[i]); } }
protected override ITextLine GetLine(int index) { ITextLine line = new Utf8GapStorageLine(buffer.GetLine(index)); return line; }