public static void NotifyOnChange <T>(this INotifyStateChange self, string dependentProperty, params string[] dependsOn) { foreach (var dependsOnPropName in dependsOn) { self.HookToPropertyChangedEvent <T>(dependsOnPropName, c => self.RaisePropertyChanged(dependentProperty)); } }
private static void StateChanged(INotifyStateChange self, string name, object value) { self.RaisePropertyChanged(name); var tracking = (self as IChangeTracking); if (tracking != null) { tracking.TrackChanges(name, value); } }