private bool ProceedWithMerge(UndoTransactionImpl transaction1, UndoTransactionImpl transaction2) { UndoHistoryRegistryImpl registry = UndoHistoryRegistry; return(transaction1.MergePolicy != null && transaction2.MergePolicy != null && transaction1.MergePolicy.TestCompatiblePolicy(transaction2.MergePolicy) && transaction1.MergePolicy.CanMerge(transaction1, transaction2)); }
public UndoHistoryImpl(UndoHistoryRegistryImpl undoHistoryRegistry) { this.currentTransaction = null; this.UndoHistoryRegistry = undoHistoryRegistry; this.undoStack = new Stack <ITextUndoTransaction>(); this.redoStack = new Stack <ITextUndoTransaction>(); this.activeUndoOperationPrimitive = null; this.state = TextUndoHistoryState.Idle; }