Ejemplo n.º 1
0
        private void AddPropertyDependencyInternal(IEnumerable <PropertyPathElement> propertyPath,
                                                   ActionWithTag actionWithTag)
        {
            var propertyName = propertyPath.First();

            // Add property dependency
            PropertyPathElement propertyPathElement = propertyName;

            Dependency.GetOrAdd(propertyPathElement).Add(actionWithTag);

            if (propertyPath.Count() > 1)
            {
                var dp = SubtreeDependency.GetOrAdd(propertyPathElement);
                dp.AddPropertyDependencyInternal(propertyPath.Skip(1), actionWithTag);
            }
        }
Ejemplo n.º 2
0
 public void AddPropertyDependency(PropertyPath propertyPath, ActionWithTag actionWithTag)
 {
     AddPropertyDependencyInternal(propertyPath, actionWithTag);
     Resubscribe(Targets[_nullObject], _nullObject);
 }