public void ApplyTo(TrackablePocoTracker <T> tracker) { if (tracker == null) { throw new ArgumentNullException(nameof(tracker)); } foreach (var item in ChangeMap) { tracker.TrackSet(item.Key, item.Value.OldValue, item.Value.NewValue); } }
public void RollbackTo(TrackablePocoTracker <T> tracker) { if (tracker == null) { throw new ArgumentNullException(nameof(tracker)); } if (this == tracker) { ChangeMap.Clear(); } else { foreach (var item in ChangeMap) { tracker.TrackSet(item.Key, item.Value.NewValue, item.Value.OldValue); } } }