/// <summary> /// Sets a new dependency on a Bindable LINQ operation. /// </summary> /// <param name="definition">A definition of the dependency.</param> public void AcceptDependency(IDependencyDefinition definition) { if (definition.AppliesToCollections()) { var dependency = definition.ConstructForCollection(_sourceCollection, BindingConfigurations.Default.CreatePathNavigator()); dependency.SetReevaluateCallback(o => Refresh()); _dependencies.Add(dependency); } }
/// <summary> /// Accepts a dependency. /// </summary> /// <param name="definition">The definition.</param> public void AcceptDependency(IDependencyDefinition definition) { AssertDispatcherThread(); AssertUnsealed(); if (!definition.AppliesToCollections()) { return; } var dependency = definition.ConstructForCollection(SourceCollection, BindingConfigurations.Default.CreatePathNavigator()); dependency.SetReevaluateElementCallback(((element, propertyName) => ReactToItemPropertyChanged((TSource)element, propertyName))); dependency.SetReevaluateCallback((element => ReactToReset())); _dependencies.Add(dependency); }