C# Class ICSharpCode.AvalonEdit.Document.ChangeTrackingCheckpoint

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

Public Methods

Method 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

Method 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 method

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

CompareAge() public method

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
return int

Create() public static method

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
return ChangeTrackingCheckpoint

GetChangesTo() public method

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
return IEnumerable

MoveOffsetTo() public method

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
return int