private void UpdateInnerList()
        {
            var newGroupingList = CreateGroupingList();
            var intersect       = InnerList.Intersect(newGroupingList, innerListKeyComparer);

            foreach (var target in intersect)
            {
                var source = newGroupingList.First(x => innerListKeyComparer.Equals(x, target));
                ListMerger.Merge(source, target, elementComparer, target.Insert, target.RemoveAt, () => target.Reset(source));
            }
            ListMerger.Merge(newGroupingList, InnerList, innerListKeyComparer, Insert, RemoveAt, () => Reset(newGroupingList));
        }
Beispiel #2
0
        private void UpdateInnerList()
        {
            T[] newList;
            if (Filter != null)
            {
                newList = originalList.Where(x => Filter(x)).ToArray();
            }
            else
            {
                newList = originalList.ToArray();
            }

            ListMerger.Merge(newList, innerList, comparer, Insert, RemoveAt, () => Reset(newList));
        }