Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/28/20 16:23:01 (4 years ago)
Author:
abeham
Message:

#2521: worked on scheduling problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Collections/3.3/ObservableCollection.cs

    r17226 r17461  
    2020#endregion
    2121
    22 using HEAL.Attic;
    2322using System;
    2423using System.Collections;
     
    2625using System.ComponentModel;
    2726using System.Linq;
     27using HEAL.Attic;
    2828
    2929namespace HeuristicLab.Collections {
     
    9797    public void AddRange(IEnumerable<T> collection) {
    9898      int capacity = list.Capacity;
    99       ICollection<T> items = collection as ICollection<T> ?? collection.ToList();
     99      var items = collection as ICollection<T> ?? collection.ToList();
    100100      list.AddRange(items);
    101101      if (items.Count > 0) {
     102        OnItemsAdded(items);
    102103        if (list.Capacity != capacity)
    103104          OnPropertyChanged("Capacity");
    104         OnPropertyChanged("Count");
    105         OnItemsAdded(items);
     105        OnPropertyChanged("Item[]");
     106        OnPropertyChanged("Count");
    106107      }
    107108    }
Note: See TracChangeset for help on using the changeset viewer.