4 using System.Collections.Generic;
7 using SiliconStudio.Core.Extensions;
9 namespace SiliconStudio.ActionStack
23 : this(null, actionItems)
35 if (actionItems == null)
throw new ArgumentNullException(
"actionItems");
36 this.actionItems = actionItems;
43 public override bool IsSaved {
get {
return ActionItems.All(x => x.IsSaved); } set { ActionItems.ForEach(x => x.IsSaved = value); } }
55 foreach (var actionItem
in ActionItems)
58 if (aggregateActionItem != null)
60 foreach (var subActionItem
in aggregateActionItem.GetInnerActionItems())
62 yield
return subActionItem;
67 yield
return actionItem;
75 foreach (var actionItem
in actionItems.Where(x => x != null))
82 foreach (var actionItem
in ActionItems.Reverse().Where(x => x != null))
89 foreach (var actionItem
in ActionItems.Where(x => x != null))
override void FreezeMembers()
Invoked by Freeze before setting IsFrozen to true. This method will not be invoked if IsFrozen is alr...
override void UndoAction()
Invoked by Undo after setting IsDone to true.
Base class for action items.
An ActionItem that represents a set of multiple action items.
AggregateActionItem(string name, IEnumerable< IActionItem > actionItems)
Initializes a new instance of the AggregateActionItem class with the given name and collection of act...
bool ContainsAction(IActionItem actionItem)
Gets whether the given action item is contained in this aggregate. The action item to look for...
Base interface for action items.
Base interface of aggregate of action items.
IEnumerable< IActionItem > GetInnerActionItems()
Gets all action items contained in this aggregate that are not IAggregateActionItem themselves...
AggregateActionItem(IEnumerable< IActionItem > actionItems)
Initializes a new instance of the AggregateActionItem class with the given collection of action items...
override void RedoAction()
Invoked by Redo after setting IsDone to true.