コード例 #1
0
ファイル: DependencyNode.cs プロジェクト: mac-michael/bfsharp
        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);
            }
        }
コード例 #2
0
ファイル: DependencyNode.cs プロジェクト: mac-michael/bfsharp
 public void AddPropertyDependency(PropertyPath propertyPath, ActionWithTag actionWithTag)
 {
     AddPropertyDependencyInternal(propertyPath, actionWithTag);
     Resubscribe(Targets[_nullObject], _nullObject);
 }