2008-07-17 21:19:41 +00:00
|
|
|
|
#region CPL License
|
|
|
|
|
/*
|
|
|
|
|
Nuclex Framework
|
2014-07-19 09:13:36 +00:00
|
|
|
|
Copyright (C) 2002-2014 Nuclex Development Labs
|
2008-07-17 21:19:41 +00:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2007-07-10 19:25:18 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Nuclex.Support.Collections {
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2012-02-29 16:27:43 +00:00
|
|
|
|
/// Argument container used by collections to notify about changed items
|
2007-07-10 19:25:18 +00:00
|
|
|
|
/// </summary>
|
2012-02-29 16:27:43 +00:00
|
|
|
|
public class ItemEventArgs<TItem> : EventArgs {
|
2007-07-10 19:25:18 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>Initializes a new event arguments supplier</summary>
|
|
|
|
|
/// <param name="item">Item to be supplied to the event handler</param>
|
2012-02-29 16:27:43 +00:00
|
|
|
|
public ItemEventArgs(TItem item) {
|
2007-07-10 19:25:18 +00:00
|
|
|
|
this.item = item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Obtains the collection item the event arguments are carrying</summary>
|
2012-02-29 16:27:43 +00:00
|
|
|
|
public TItem Item {
|
2007-07-10 19:25:18 +00:00
|
|
|
|
get { return this.item; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>Item to be passed to the event handler</summary>
|
2012-02-29 16:27:43 +00:00
|
|
|
|
private TItem item;
|
2007-07-10 19:25:18 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Nuclex.Support.Collections
|