Changeset 17461 for branches/2521_ProblemRefactoring/HeuristicLab.Collections/3.3/ObservableCollection.cs
- Timestamp:
- 02/28/20 16:23:01 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Collections/3.3/ObservableCollection.cs
r17226 r17461 20 20 #endregion 21 21 22 using HEAL.Attic;23 22 using System; 24 23 using System.Collections; … … 26 25 using System.ComponentModel; 27 26 using System.Linq; 27 using HEAL.Attic; 28 28 29 29 namespace HeuristicLab.Collections { … … 97 97 public void AddRange(IEnumerable<T> collection) { 98 98 int capacity = list.Capacity; 99 ICollection<T>items = collection as ICollection<T> ?? collection.ToList();99 var items = collection as ICollection<T> ?? collection.ToList(); 100 100 list.AddRange(items); 101 101 if (items.Count > 0) { 102 OnItemsAdded(items); 102 103 if (list.Capacity != capacity) 103 104 OnPropertyChanged("Capacity"); 104 OnPropertyChanged(" Count");105 On ItemsAdded(items);105 OnPropertyChanged("Item[]"); 106 OnPropertyChanged("Count"); 106 107 } 107 108 }
Note: See TracChangeset
for help on using the changeset viewer.