Changeset 2573 for trunk/sources
- Timestamp:
- 12/27/09 04:12:00 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Collections/3.3
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj
r2572 r2573 49 49 </ItemGroup> 50 50 <ItemGroup> 51 <Compile Include="ObservableKeyedCollectionBase.cs" /> 51 52 <Compile Include="IndexedCollectionChangedEventsBase.cs" /> 52 53 <Compile Include="ObservableCollection.cs" /> -
trunk/sources/HeuristicLab.Collections/3.3/ObservableCollection.cs
r2572 r2573 97 97 } 98 98 public void RemoveRange(IEnumerable<T> collection) { 99 if (collection == null) throw new ArgumentNullException(); 99 100 List<T> items = new List<T>(); 100 101 foreach (T item in collection) { -
trunk/sources/HeuristicLab.Collections/3.3/ObservableDictionary.cs
r2572 r2573 56 56 } 57 57 set { 58 KeyValuePair<TKey, TValue> item = new KeyValuePair<TKey, TValue>(key, dict[key]); 59 dict[key] = value; 60 OnItemsReplaced(new KeyValuePair<TKey, TValue>[] { new KeyValuePair<TKey, TValue>(key, value) }, new KeyValuePair<TKey, TValue>[] { item }); 58 if (dict.ContainsKey(key)) { 59 KeyValuePair<TKey, TValue> item = new KeyValuePair<TKey, TValue>(key, dict[key]); 60 dict[key] = value; 61 OnItemsReplaced(new KeyValuePair<TKey, TValue>[] { new KeyValuePair<TKey, TValue>(key, value) }, new KeyValuePair<TKey, TValue>[] { item }); 62 } else { 63 dict[key] = value; 64 OnItemsAdded(new KeyValuePair<TKey, TValue>[] { new KeyValuePair<TKey, TValue>(key, value) }); 65 } 61 66 } 62 67 } … … 94 99 return dict.Contains(item); 95 100 } 101 96 102 public bool TryGetValue(TKey key, out TValue value) { 97 103 return dict.TryGetValue(key, out value); -
trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs
r2572 r2573 184 184 } 185 185 public int RemoveAll(Predicate<T> match) { 186 if (match == null) throw new ArgumentNullException(); 186 187 List<IndexedItem<T>> items = new List<IndexedItem<T>>(); 187 188 for (int i = 0; i < list.Count; i++) {
Note: See TracChangeset
for help on using the changeset viewer.