/// <summary>
        /// Initializes a new instance of the <see cref="ActionStackViewModel"/>.
        /// </summary>
        /// <param name="actionStack">The action stack. Cannot be null.</param>
        public ActionStackViewModel(ViewModelTransactionalActionStack actionStack)
            : base(actionStack.SafeArgument("actionStack").ServiceProvider)
        {
            this.actionStack = actionStack;

            actionStack.ActionItemsAdded += ActionItemsAdded;
            actionStack.ActionItemsCleared += ActionItemsCleared;
            actionStack.ActionItemsDiscarded += ActionItemsDiscarded;
            actionStack.Undone += ActionItemModified;
            actionStack.Redone += ActionItemModified;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ActionStackViewModel"/>.
        /// </summary>
        /// <param name="actionStack">The action stack. Cannot be null.</param>
        public ActionStackViewModel(ViewModelTransactionalActionStack actionStack)
            : base(actionStack.SafeArgument("actionStack").ServiceProvider)
        {
            this.actionStack = actionStack;

            actionStack.ActionItemsAdded     += ActionItemsAdded;
            actionStack.ActionItemsCleared   += ActionItemsCleared;
            actionStack.ActionItemsDiscarded += ActionItemsDiscarded;
            actionStack.Undone += ActionItemModified;
            actionStack.Redone += ActionItemModified;
        }