C# Class ICSharpCode.AvalonEdit.Document.ChangeTrackingCheckpoint

A checkpoint that allows tracking changes to a TextDocument. Use TextDocument.CreateSnapshot(out ChangeTrackingCheckpoint) to create a checkpoint.
Afficher le fichier Open project: kjk/kjkpub Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

BelongsToSameDocumentAs() public méthode

Gets whether this checkpoint belongs to the same document as the other checkpoint.
public BelongsToSameDocumentAs ( ChangeTrackingCheckpoint other ) : bool
other ChangeTrackingCheckpoint
Résultat bool

CompareAge() public méthode

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
Résultat int

Create() public static méthode

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
Résultat ChangeTrackingCheckpoint

GetChangesTo() public méthode

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
Résultat IEnumerable

MoveOffsetTo() public méthode

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
Résultat int