public ImmediateEditingScope(ModelTreeManager modelTreeManager, UndoEngine.Bookmark undoEngineBookmark) : base(modelTreeManager, null) { Fx.Assert(modelTreeManager != null, "modelTreeManager should never be null!"); Fx.Assert(undoEngineBookmark != null, "undoEngineBookmark should never be null!"); this.modelTreeManager = modelTreeManager; this.undoEngineBookmark = undoEngineBookmark; }
protected override void OnRevert(bool finalizing) { this.undoEngineBookmark.RollbackBookmark(); this.undoEngineBookmark = null; this.modelTreeManager.OnEditingScopeReverted(this); }
protected override void OnComplete() { this.undoEngineBookmark.CommitBookmark(); this.undoEngineBookmark = null; this.modelTreeManager.OnEditingScopeCompleted(this); }