#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2013 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Nuclex.Support.Collections {
/// Interface for collections that can be observed
/// Type of items managed in the collection
public interface IObservableCollection {
/// Raised when an item has been added to the collection
event EventHandler> ItemAdded;
/// Raised when an item is removed from the collection
event EventHandler> ItemRemoved;
/// Raised when an item is replaced in the collection
event EventHandler> ItemReplaced;
/// Raised when the collection is about to be cleared
///
/// This could be covered by calling ItemRemoved for each item currently
/// contained in the collection, but it is often simpler and more efficient
/// to process the clearing of the entire collection as a special operation.
///
event EventHandler Clearing;
/// Raised when the collection has been cleared of its items
event EventHandler Cleared;
}
} // namespace Nuclex.Support.Collections