Exemplo n.º 1
0
        internal void EndCombinedAction(string displayName, string observableNodePath, object value)
        {
            var actions = ActionStack.GetCurrentTransactions();

            if (actions.Count == 0)
            {
                ActionStack.DiscardTransaction();
            }
            else
            {
                ActionStack.EndTransaction(displayName, x => new CombinedValueChangedActionItem(displayName, observableViewModelService, observableNodePath, Identifier, x));
            }
        }
Exemplo n.º 2
0
        internal void EndCombinedAction(string displayName, string observableNodePath, object value)
        {
            bool shouldDiscard = true;

            foreach (var singleNode in dirtiableViewModels.Keys)
            {
                if (singleNode.Owner.singleNodeActionRegistered)
                {
                    shouldDiscard = false;
                }

                singleNode.Owner.singleNodeActionRegistered = false;
            }

            if (shouldDiscard)
            {
                ActionStack.DiscardTransaction();
            }
            else
            {
                ActionStack.EndTransaction(displayName, x => new CombinedValueChangedActionItem(displayName, observableViewModelService, observableNodePath, Identifier, x));
            }
        }