Exemplo n.º 1
0
        public override async Task Invoke(object parameter)
        {
            ActionStack?.BeginTransaction();
            commands.First().NodeCommand.StartCombinedInvoke();
            await Task.WhenAll(commands.Select(x => x.Invoke(parameter)));

            commands.First().NodeCommand.EndCombinedInvoke();
            ActionStack?.EndTransaction($"Executed {Name}");
        }
Exemplo n.º 2
0
        public override async Task Invoke(object parameter)
        {
            ActionStack?.BeginTransaction();
            object index;
            var    modelNode = NodePath.GetSourceNode(out index);

            if (modelNode == null)
            {
                throw new InvalidOperationException("Unable to retrieve the node on which to apply the redo operation.");
            }

            NodeCommand.Execute(modelNode.Content, index, parameter);
            ActionStack?.EndTransaction($"Execute {Name}");
        }
Exemplo n.º 3
0
 internal void BeginCombinedAction()
 {
     ActionStack.BeginTransaction();
     singleNodeActionRegistered = false;
 }
Exemplo n.º 4
0
 internal void BeginCombinedAction()
 {
     ActionStack.BeginTransaction();
 }