C# Класс ICSharpCode.AvalonEdit.Document.ChangeTrackingCheckpoint

A checkpoint that allows tracking changes to a TextDocument. Use TextDocument.CreateSnapshot(out ChangeTrackingCheckpoint) to create a checkpoint.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BelongsToSameDocumentAs ( ChangeTrackingCheckpoint other ) : bool

Gets whether this checkpoint belongs to the same document as the other checkpoint.

CompareAge ( ChangeTrackingCheckpoint other ) : int

Compares the age of this checkpoint to the other checkpoint.

This method is thread-safe.

Create ( TextDocument document ) : ChangeTrackingCheckpoint

Creates a change tracking checkpoint for the specified document. This method is thread-safe. If you need a ChangeTrackingCheckpoint that's consistent with a snapshot of the document, use TextDocument.CreateSnapshot(out ChangeTrackingCheckpoint).

GetChangesTo ( ChangeTrackingCheckpoint other ) : IEnumerable

Gets the changes from this checkpoint to the other checkpoint. If 'other' is older than this checkpoint, reverse changes are calculated.

This method is thread-safe.

MoveOffsetTo ( ChangeTrackingCheckpoint other, int oldOffset, AnchorMovementType movement ) : int

Calculates where the offset has moved in the other buffer version.

This method is thread-safe.

Приватные методы

Метод Описание
Append ( ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs change ) : ChangeTrackingCheckpoint
ChangeTrackingCheckpoint ( object documentIdentifier ) : System
ChangeTrackingCheckpoint ( object documentIdentifier, ICSharpCode.AvalonEdit.Document.DocumentChangeEventArgs value, int id ) : System
GetForwardChanges ( ChangeTrackingCheckpoint other ) : IEnumerable

Описание методов

BelongsToSameDocumentAs() публичный Метод

Gets whether this checkpoint belongs to the same document as the other checkpoint.
public BelongsToSameDocumentAs ( ChangeTrackingCheckpoint other ) : bool
other ChangeTrackingCheckpoint
Результат bool

CompareAge() публичный Метод

Compares the age of this checkpoint to the other checkpoint.
This method is thread-safe.
Raised if 'other' belongs to a different document than this checkpoint.
public CompareAge ( ChangeTrackingCheckpoint other ) : int
other ChangeTrackingCheckpoint
Результат int

Create() публичный статический Метод

Creates a change tracking checkpoint for the specified document. This method is thread-safe. If you need a ChangeTrackingCheckpoint that's consistent with a snapshot of the document, use TextDocument.CreateSnapshot(out ChangeTrackingCheckpoint).
public static Create ( TextDocument document ) : ChangeTrackingCheckpoint
document TextDocument
Результат ChangeTrackingCheckpoint

GetChangesTo() публичный Метод

Gets the changes from this checkpoint to the other checkpoint. If 'other' is older than this checkpoint, reverse changes are calculated.
This method is thread-safe.
Raised if 'other' belongs to a different document than this checkpoint.
public GetChangesTo ( ChangeTrackingCheckpoint other ) : IEnumerable
other ChangeTrackingCheckpoint
Результат IEnumerable

MoveOffsetTo() публичный Метод

Calculates where the offset has moved in the other buffer version.
This method is thread-safe.
Raised if 'other' belongs to a different document than this checkpoint.
public MoveOffsetTo ( ChangeTrackingCheckpoint other, int oldOffset, AnchorMovementType movement ) : int
other ChangeTrackingCheckpoint
oldOffset int
movement AnchorMovementType
Результат int