public void RegisterRelationProperty(string origin, NotifyBase target_owner, params string[] target_prop) { if (!PropertyRelations.TryGetValue(origin, out var rel)) { PropertyRelations[origin] = rel = new PropertyRelation(); } foreach (var prop in target_prop) { var desc = new NotifyDescriptor(target_owner, prop); if (!rel.RelatedProps.Contains(desc)) { rel.RelatedProps.Add(desc); } } }
public void RegisterItemRelationProperty(string origin, NotifyBase target_owner, params string[] target_prop) { if (!ItemPropertyRelations.TryGetValue(origin, out var rel)) { ItemPropertyRelations[origin] = rel = new PropertyRelation(); } foreach (var prop in target_prop) { var temp = new NotifyDescriptor(target_owner, prop); if (rel.RelatedProps.Contains(temp)) { continue; } rel.RelatedProps.Add(temp); } }