Memento.Mementor.Reset C# (CSharp) Method

Reset() public method

Resets the state of this Mementor object to its initial state. This effectively clears the redo stack, undo stack and current batch (if one is active).
public Reset ( ) : void
return void
        public void Reset()
        {
            bool shouldNotify = UndoCount > 0 || RedoCount > 0;
            _undoStack.Clear();
            _redoStack.Clear();
            _currentBatch = null;
            IsTrackingEnabled = true;
            if (shouldNotify) NotifyChange(null);
        }