public NestedItemsTracker(TCollection source, NotifyingPath <TItem, TProperty> path)
 {
     this.path = path;
     if (source != null)
     {
         this.AddItems(source);
         this.UpdateSource(source);
     }
 }
Exemple #2
0
        internal static ItemsTracker <TCollection, TItem, TProperty> Create <TCollection, TItem, TProperty>(
            TCollection collection,
            NotifyingPath <TItem, TProperty> path)
            where TCollection : class, IEnumerable <TItem>, INotifyCollectionChanged
            where TItem : class, INotifyPropertyChanged
        {
            if (path.Count == 1)
            {
                return(new SimpleItemsTracker <TCollection, TItem, TProperty>(
                           collection,
                           (Getter <TItem, TProperty>)path[0]));
            }

            return(new NestedItemsTracker <TCollection, TItem, TProperty>(collection, path));
        }
Exemple #3
0
 internal static ItemsTracker <TCollection, TItem, TProperty> Create <TCollection, TItem, TProperty>(
     TCollection?source,
     NotifyingPath <TItem, TProperty> path)
     where TCollection : class?, IEnumerable <TItem>?, INotifyCollectionChanged?