private void UpdateValue(object newValue) { var oldValue = value; bool changed = !Equals(oldValue, newValue); if (changed && ShouldNotify && !Profile.IsDiscarding) { var actionItem = new PropertyChangedActionItem("Value", this, oldValue, true); Profile.ActionStack.Add(actionItem); Profile.NotifyEntryChanged(Name); } value = newValue; }
public PropertyChangedViewModelActionItem(string name, object container, IEnumerable<IDirtiableViewModel> dirtiables, string propertyName, object previousValue) : base(name, dirtiables) { if (propertyName == null) throw new ArgumentNullException("propertyName"); innerActionItem = new PropertyChangedActionItem(propertyName, container, previousValue); }