Changeset 2832


Ignore:
Timestamp:
02/19/10 02:42:07 (11 years ago)
Author:
swagner
Message:

Moved CollectionItemsChanged events into own interfaces (#819)

Location:
trunk/sources/HeuristicLab.Collections/3.3
Files:
5 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj

    r2803 r2832  
    6767  <ItemGroup>
    6868    <None Include="HeuristicLabCollectionsPlugin.cs.frame" />
     69    <Compile Include="INotifyObservableListItemsChanged.cs" />
     70    <Compile Include="INotifyObservableKeyedCollectionItemsChanged.cs" />
     71    <Compile Include="INotifyObservableDictionaryItemsChanged.cs" />
     72    <Compile Include="INotifyObservableCollectionItemsChanged.cs" />
     73    <Compile Include="INotifyObservableArrayItemsChanged.cs" />
    6974    <Compile Include="ReadOnlyObservableArray.cs" />
    7075    <Compile Include="ObservableArray.cs" />
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableArray.cs

    r2790 r2832  
    2424
    2525namespace HeuristicLab.Collections {
    26   public interface IObservableArray<T> : IList<T>, INotifyPropertyChanged {
     26  public interface IObservableArray<T> : IList<T>, INotifyObservableArrayItemsChanged<T>, INotifyPropertyChanged {
    2727    int Length { get; }
    28 
    29     event CollectionItemsChangedEventHandler<IndexedItem<T>> ItemsReplaced;
    30     event CollectionItemsChangedEventHandler<IndexedItem<T>> ItemsMoved;
    31     event CollectionItemsChangedEventHandler<IndexedItem<T>> CollectionReset;
    3228  }
    3329}
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableCollection.cs

    r2790 r2832  
    2424
    2525namespace HeuristicLab.Collections {
    26   public interface IObservableCollection<T> : ICollection<T>, INotifyPropertyChanged {
    27     event CollectionItemsChangedEventHandler<T> ItemsAdded;
    28     event CollectionItemsChangedEventHandler<T> ItemsRemoved;
    29     event CollectionItemsChangedEventHandler<T> CollectionReset;
    30   }
     26  public interface IObservableCollection<T> : ICollection<T>, INotifyObservableCollectionItemsChanged<T>, INotifyPropertyChanged { }
    3127}
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableDictionary.cs

    r2790 r2832  
    2323
    2424namespace HeuristicLab.Collections {
    25   public interface IObservableDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IObservableCollection<KeyValuePair<TKey, TValue>> {
    26     event CollectionItemsChangedEventHandler<KeyValuePair<TKey, TValue>> ItemsReplaced;
    27   }
     25  public interface IObservableDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IObservableCollection<KeyValuePair<TKey, TValue>>, INotifyObservableDictionaryItemsChanged<TKey, TValue> { }
    2826}
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableKeyedCollection.cs

    r2790 r2832  
    2121
    2222namespace HeuristicLab.Collections {
    23   public interface IObservableKeyedCollection<TKey, TItem> : IObservableCollection<TItem> {
     23  public interface IObservableKeyedCollection<TKey, TItem> : IObservableCollection<TItem>, INotifyObservableKeyedCollectionItemsChanged<TKey, TItem> {
    2424    TItem this[TKey key] { get; }
    2525
     
    2828
    2929    bool Remove(TKey key);
    30 
    31     event CollectionItemsChangedEventHandler<TItem> ItemsReplaced;
    3230  }
    3331}
  • trunk/sources/HeuristicLab.Collections/3.3/IObservableList.cs

    r2790 r2832  
    2323
    2424namespace HeuristicLab.Collections {
    25   public interface IObservableList<T> : IList<T>, IObservableCollection<T> {
    26     new event CollectionItemsChangedEventHandler<IndexedItem<T>> ItemsAdded;
    27     new event CollectionItemsChangedEventHandler<IndexedItem<T>> ItemsRemoved;
    28     event CollectionItemsChangedEventHandler<IndexedItem<T>> ItemsReplaced;
    29     event CollectionItemsChangedEventHandler<IndexedItem<T>> ItemsMoved;
    30     new event CollectionItemsChangedEventHandler<IndexedItem<T>> CollectionReset;
    31   }
     25  public interface IObservableList<T> : IList<T>, IObservableCollection<T>, INotifyObservableListItemsChanged<T> { }
    3226}
  • trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs

    r2830 r2832  
    382382    [field: NonSerialized]
    383383    private event CollectionItemsChangedEventHandler<T> itemsAdded;
    384     event CollectionItemsChangedEventHandler<T> IObservableCollection<T>.ItemsAdded {
     384    event CollectionItemsChangedEventHandler<T> INotifyObservableCollectionItemsChanged<T>.ItemsAdded {
    385385      add { itemsAdded += value; }
    386386      remove { itemsAdded -= value; }
     
    400400    [field: NonSerialized]
    401401    private event CollectionItemsChangedEventHandler<T> itemsRemoved;
    402     event CollectionItemsChangedEventHandler<T> IObservableCollection<T>.ItemsRemoved {
     402    event CollectionItemsChangedEventHandler<T> INotifyObservableCollectionItemsChanged<T>.ItemsRemoved {
    403403      add { itemsRemoved += value; }
    404404      remove { itemsRemoved -= value; }
     
    432432    [field: NonSerialized]
    433433    private event CollectionItemsChangedEventHandler<T> collectionReset;
    434     event CollectionItemsChangedEventHandler<T> IObservableCollection<T>.CollectionReset {
     434    event CollectionItemsChangedEventHandler<T> INotifyObservableCollectionItemsChanged<T>.CollectionReset {
    435435      add { collectionReset += value; }
    436436      remove { collectionReset -= value; }
  • trunk/sources/HeuristicLab.Collections/3.3/ReadOnlyObservableList.cs

    r2790 r2832  
    121121    [field: NonSerialized]
    122122    private event CollectionItemsChangedEventHandler<T> itemsAdded;
    123     event CollectionItemsChangedEventHandler<T> IObservableCollection<T>.ItemsAdded {
     123    event CollectionItemsChangedEventHandler<T> INotifyObservableCollectionItemsChanged<T>.ItemsAdded {
    124124      add { itemsAdded += value; }
    125125      remove { itemsAdded -= value; }
     
    139139    [field: NonSerialized]
    140140    private event CollectionItemsChangedEventHandler<T> itemsRemoved;
    141     event CollectionItemsChangedEventHandler<T> IObservableCollection<T>.ItemsRemoved {
     141    event CollectionItemsChangedEventHandler<T> INotifyObservableCollectionItemsChanged<T>.ItemsRemoved {
    142142      add { itemsRemoved += value; }
    143143      remove { itemsRemoved -= value; }
     
    171171    [field: NonSerialized]
    172172    private event CollectionItemsChangedEventHandler<T> collectionReset;
    173     event CollectionItemsChangedEventHandler<T> IObservableCollection<T>.CollectionReset {
     173    event CollectionItemsChangedEventHandler<T> INotifyObservableCollectionItemsChanged<T>.CollectionReset {
    174174      add { collectionReset += value; }
    175175      remove { collectionReset -= value; }
Note: See TracChangeset for help on using the changeset viewer.