Exemplo n.º 1
0
        public override void Execute(object parameter)
        {
            actionStack.BeginTransaction();
            Redo(parameter, true);
            var displayName = "Executing " + Name;

            var observableViewModel = service.ViewModelProvider(identifier);

            if (observableViewModel != null && !commands.Any(x => observableViewModel.MatchCombinedRootNode(x.GetCommandRootNode())))
            {
                observableViewModel = null;
            }

            var node = observableViewModel != null?observableViewModel.ResolveObservableNode(ObservableNodePath) as CombinedObservableNode : null;

            // TODO: this need to be verified but I suppose node is never null
            actionStack.EndTransaction(displayName, x => new CombinedValueChangedActionItem(displayName, service, node != null ? node.Path : null, identifier, x));
        }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public override void Execute(object parameter)
 {
     actionStack.BeginTransaction();
     base.Execute(parameter);
     actionStack.EndTransaction(string.Format("Executing {0}", Name));
 }