Table of Contents

Class CodeDocumentEdit

Namespace
CodeEdit.Maui
Assembly
CodeEdit.Maui.dll

Describes source-only changes within a CodeDocument transaction.

public sealed class CodeDocumentEdit
Inheritance
CodeDocumentEdit
Inherited Members

Remarks

Offsets observe preceding operations in the same callback.

Methods

DeleteText(TextSpan)

Deletes a UTF-16 source range.

public void DeleteText(TextSpan range)

Parameters

range TextSpan

The range to delete.

InsertText(int, string?)

Inserts source at a UTF-16 offset.

public void InsertText(int position, string? text)

Parameters

position int

The insertion offset.

text string

The inserted source.

NormalizeLineEndings(string)

Explicitly replaces every source line terminator with LF, CRLF, or CR in this undoable transaction.

public void NormalizeLineEndings(string lineEnding)

Parameters

lineEnding string

ReplaceText(TextSpan, string?)

Replaces a UTF-16 range with source text.

public void ReplaceText(TextSpan range, string? text)

Parameters

range TextSpan

The replaced range.

text string

The replacement source.