private void ChildPropertyChanged(List <string> paths) { PropertyChangesTracker.StoreChangedChildProperties(this.instance, paths); HashSet <string> allChangedProperties = new HashSet <string>(); do { paths = paths.Except(allChangedProperties).ToList(); foreach (string path in paths) { if (!allChangedProperties.Contains(path)) { allChangedProperties.Add(path); } } List <string> changedProperties = paths.SelectMany(this.explicitDependencyMap.GetDependentProperties).ToList(); PropertyChangesTracker.StoreChangedProperties(this.instance, changedProperties); paths = paths.SelectMany(this.GetAffectedPaths).Union(changedProperties).ToList(); PropertyChangesTracker.StoreChangedChildProperties(this.instance, paths.ToList()); }while (paths.Count > 0); }
private void OnPropertyChanged(object sender, PropertyChangedEventArgs eventArgs) { if (!PropertyChangesTracker.AreEventsFiring) { this.ChildPropertyChanged(new List <string>() { eventArgs.PropertyName }); PropertyChangesTracker.RaisePropertyChangedIfNeeded(this.instance); } }
public void HandleFieldChange(LocationInterceptionArgs args) { List <string> propertyList; if (FieldDependenciesMap.FieldDependentProperties.TryGetValue(args.LocationFullName, out propertyList)) { PropertyChangesTracker.StoreChangedProperties(this.instance, propertyList); } if (propertyList == null) { propertyList = new List <string>(); } else { propertyList = propertyList.ToList(); } propertyList.Add(args.LocationName); this.ChildPropertyChanged(propertyList); this.ReHookNotifyChildPropertyChangedHandler(args); }