Example #1
0
        private void CompleteTransaction()
        {
            if (currentTransaction == null)
            {
                throw new InvalidOperationException("Trying to complete a selection transaction but no transaction in progress");
            }

            var newState = new SelectionState();

            newState.SaveStates(scopes);

            currentTransaction.Continue();
            stack.PushOperation(new SelectionOperation(this, CurrentState, newState));
            currentTransaction.Complete();
            currentTransaction = null;

            CurrentState = newState;
        }
Example #2
0
 public void PushOperation(Operation operation) => stack.PushOperation(operation);