Class
TextChange

Represents a text change.

Definition

Namespace:Telerik.Windows.SyntaxEditor.Core.Text

Assembly:Telerik.Windows.SyntaxEditor.Core.dll

Syntax:

cs-api-definition
public class TextChange

Inheritance: objectTextChange

Constructors

TextChange(int, string, string)

Initializes a new instance of the TextChange class.

Declaration

cs-api-definition
public TextChange(int oldPosition, string oldText, string newText)

Parameters

oldPosition

int

oldText

string

newText

string

Properties

Delta

Gets the difference in the new / old text lengths.

Declaration

cs-api-definition
public int Delta { get; }

Property Value

int

InsertedLineCount

Gets the inserted lines count.

Declaration

cs-api-definition
public int InsertedLineCount { get; }

Property Value

int

LineCountDelta

Gets the line count difference.

Declaration

cs-api-definition
public int LineCountDelta { get; }

Property Value

int

NewSpan

Gets the new span.

Declaration

cs-api-definition
public Span NewSpan { get; }

Property Value

Span

NewText

Gets the new text.

Declaration

cs-api-definition
public string NewText { get; }

Property Value

string

OldSpan

Gets the old span.

Declaration

cs-api-definition
public Span OldSpan { get; }

Property Value

Span

OldText

Gets the old text.

Declaration

cs-api-definition
public string OldText { get; }

Property Value

string

Methods

Reverse()

Reverses the text change.

Declaration

cs-api-definition
public TextChange Reverse()

Returns

TextChange

TranslatePosition(int, PositionAnchoringType)

Translates the given position.

Declaration

cs-api-definition
public int TranslatePosition(int position, PositionAnchoringType anchorType)

Parameters

position

int

anchorType

PositionAnchoringType

Returns

int