title: How can I raise a CollectionChanged event on an ObservableCollection, and pass it the changed items?
body: <p>I have a class that inherits from <code>ObservableCollection</code> and adds a few additional methods such as <code>AddRange</code> and <code>RemoveRange</code></p>
  
  <p>My base method call is this:</p>
  
  <pre><code>public void AddRange(IEnumerable&lt;T&gt; collection)
  {
      foreach (var i in collection) Items.Add(i);
  
      OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
  }
  </code></pre>
  
  <p>My problem with this is that I want to access <code>e.NewItems</code> or <code>e.OldItems</code> in the <code>CollectionChanged</code> event to perform an action on whatever item is in the collection, and the <code>NotifyCollectionChangedAction.Reset</code> action does not pass in these values</p>
  
  <pre><code>void Instances_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
  {
      if (e.NewItems != null) // e.NewItems is always null
      {
          foreach (var item in e.NewItems)
          {
              if (item is EventInstanceModel)
                  ((EventInstanceModel)item).ParentEvent = this;
          }
      }
  }
  </code></pre>
  
  <p>So I thought I could just use the <code>NotifyCollectionChangedAction.Add</code> instead of <code>Reset</code>, however that throws a <code>Range actions are not supported</code> exception</p>
  
  <pre><code>public void AddRange(IEnumerable&lt;T&gt; collection)
  {
      var addedItems = collection.ToList();
      foreach (var i in addedItems) Items.Add(i);
  
      OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, addedItems));
  }
  </code></pre>
  
  <p>So my question is, how can I raise a CollectionChanged event, and pass it the new or old item list?</p>