Changeset 2830 for trunk/sources/HeuristicLab.Collections/3.3
- Timestamp:
- 02/19/10 02:15:10 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Collections/3.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Collections/3.3/ObservableArray.cs
r2790 r2830 68 68 public ObservableArray(T[] array) { 69 69 this.array = (T[])array.Clone(); 70 OnCollectionReset(GetIndexedItems(), new IndexedItem<T>[0]);71 70 } 72 71 public ObservableArray(IEnumerable<T> collection) { 73 72 array = collection.ToArray(); 74 OnCollectionReset(GetIndexedItems(), new IndexedItem<T>[0]);75 73 } 76 74 #endregion -
trunk/sources/HeuristicLab.Collections/3.3/ObservableCollection.cs
r2790 r2830 59 59 public ObservableCollection(IEnumerable<T> collection) { 60 60 list = new List<T>(collection); 61 OnItemsAdded(collection);62 61 } 63 62 #endregion -
trunk/sources/HeuristicLab.Collections/3.3/ObservableDictionary.cs
r2790 r2830 79 79 public ObservableDictionary(IDictionary<TKey, TValue> dictionary) { 80 80 dict = new Dictionary<TKey, TValue>(dictionary); 81 OnItemsAdded(dictionary);82 81 } 83 82 public ObservableDictionary(int capacity, IEqualityComparer<TKey> comparer) { … … 86 85 public ObservableDictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer) { 87 86 dict = new Dictionary<TKey, TValue>(dictionary, comparer); 88 OnItemsAdded(dictionary);89 87 } 90 88 #endregion -
trunk/sources/HeuristicLab.Collections/3.3/ObservableKeyedCollection.cs
r2790 r2830 66 66 foreach (TItem item in collection) 67 67 dict.Add(GetKeyForItem(item), item); 68 OnItemsAdded(collection);69 68 } 70 69 protected ObservableKeyedCollection(int capacity, IEqualityComparer<TKey> comparer) { … … 76 75 foreach (TItem item in collection) 77 76 dict.Add(GetKeyForItem(item), item); 78 OnItemsAdded(collection);79 77 } 80 78 #endregion -
trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs
r2790 r2830 73 73 public ObservableList(IEnumerable<T> collection) { 74 74 list = new List<T>(collection); 75 OnItemsAdded(GetIndexedItems());76 OnItemsAdded(collection);77 75 } 78 76 #endregion -
trunk/sources/HeuristicLab.Collections/3.3/ObservableSet.cs
r2790 r2830 51 51 public ObservableSet(IEnumerable<T> collection) { 52 52 set = new HashSet<T>(collection); 53 OnItemsAdded(this);54 53 } 55 54 public ObservableSet(IEqualityComparer<T> comparer) { … … 58 57 public ObservableSet(IEnumerable<T> collection, IEqualityComparer<T> comparer) { 59 58 set = new HashSet<T>(collection, comparer); 60 OnItemsAdded(this);61 59 } 62 60 #endregion
Note: See TracChangeset
for help on using the changeset viewer.