4 using System.Collections;
5 using System.Collections.Generic;
6 using System.Collections.Specialized;
8 using SiliconStudio.ActionStack;
9 using SiliconStudio.Presentation.Services;
11 namespace SiliconStudio.Presentation.ViewModel.
ActionStack
19 : base(name, dirtiables)
21 if (dispatcher == null)
throw new ArgumentNullException(
"dispatcher");
22 this.dispatcher = dispatcher;
26 : this(name, dirtiables, dispatcher)
32 : this(name, dirtiables, dispatcher)
37 public NotifyCollectionChangedAction ActionToUndo {
get {
return innerActionItem.ActionToUndo; } }
39 public int ItemCount {
get {
return innerActionItem.ItemCount; } }
45 innerActionItem.Freeze();
51 dispatcher.Invoke(() => innerActionItem.Undo());
CollectionChangedViewModelActionItem(string name, IEnumerable< IDirtiableViewModel > dirtiables, IList list, NotifyCollectionChangedAction actionToUndo, IReadOnlyCollection< object > items, int index, IDispatcherService dispatcher)
override void FreezeMembers()
Invoked by Freeze before setting IsFrozen to true. This method will not be invoked if IsFrozen is alr...
override void RedoAction()
Invoked by Redo after setting IsDone to true.
override void UndoAction()
Invoked by Undo after setting IsDone to true.
An abstact class that inherits from ActionItem and can be used to manage actions related to an IDirti...
CollectionChangedViewModelActionItem(string name, IEnumerable< IDirtiableViewModel > dirtiables, IList list, NotifyCollectionChangedEventArgs args, IDispatcherService dispatcher)
This class represents a thread-safe stack of action items that can be undone/redone.