Changeset 14029 for branches/crossvalidation-2434/HeuristicLab.Collections
- Timestamp:
- 07/08/16 14:40:02 (8 years ago)
- Location:
- branches/crossvalidation-2434
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crossvalidation-2434
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Collections/3.3/ObservableCollection.cs
r12012 r14029 20 20 #endregion 21 21 22 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 22 23 using System; 23 24 using System.Collections; 24 25 using System.Collections.Generic; 25 26 using System.ComponentModel; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;27 using System.Linq; 27 28 28 29 namespace HeuristicLab.Collections { … … 96 97 public void AddRange(IEnumerable<T> collection) { 97 98 int capacity = list.Capacity; 98 int count = list.Count;99 list.AddRange( collection);100 if ( list.Count != count) {99 ICollection<T> items = collection as ICollection<T> ?? collection.ToList(); 100 list.AddRange(items); 101 if (items.Count > 0) { 101 102 if (list.Capacity != capacity) 102 103 OnPropertyChanged("Capacity"); 103 104 OnPropertyChanged("Count"); 104 OnItemsAdded( collection);105 OnItemsAdded(items); 105 106 } 106 107 } -
branches/crossvalidation-2434/HeuristicLab.Collections/3.3/ObservableList.cs
r12012 r14029 20 20 #endregion 21 21 22 using HeuristicLab.Common; 23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 22 24 using System; 23 25 using System.Collections; … … 25 27 using System.ComponentModel; 26 28 using System.Linq; 27 using HeuristicLab.Common;28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;29 29 30 30 namespace HeuristicLab.Collections { … … 169 169 int capacity = list.Capacity; 170 170 int index = list.Count; 171 list.AddRange(collection);172 171 List<IndexedItem<T>> items = new List<IndexedItem<T>>(); 173 172 foreach (T item in collection) { … … 175 174 index++; 176 175 } 176 list.AddRange(items.Select(x => x.Value)); 177 177 if (items.Count > 0) { 178 178 OnItemsAdded(items); 179 OnItemsAdded( collection);179 OnItemsAdded(items.Select(x => x.Value)); 180 180 if (list.Capacity != capacity) 181 181 OnPropertyChanged("Capacity"); -
branches/crossvalidation-2434/HeuristicLab.Collections/3.3/Plugin.cs.frame
r12753 r14029 26 26 /// Plugin class for HeuristicLab.Collections plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Collections", "3.3.1 2.$WCREV$")]28 [Plugin("HeuristicLab.Collections", "3.3.13.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Collections-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Persistence", "3.3")] -
branches/crossvalidation-2434/HeuristicLab.Collections/3.3/Properties/AssemblyInfo.cs.frame
r12753 r14029 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3.1 2.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.13.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.