- Timestamp:
- 02/28/20 16:23:01 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Collections/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Collections/3.3/IObservableCollection.cs
r17226 r17461 26 26 namespace HeuristicLab.Collections { 27 27 [StorableType("289d81e9-a167-416c-aaa8-c40aa1ea96f9")] 28 public interface IObservableCollection<T> : ICollection<T>, INotifyObservableCollectionItemsChanged<T>, INotifyPropertyChanged { } 28 public interface IObservableCollection<T> : ICollection<T>, INotifyObservableCollectionItemsChanged<T>, INotifyPropertyChanged { 29 } 29 30 } -
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.