ItemEventArgs.cs 601 B

1234567891011121314151617181920
  1. using System;
  2. namespace MonoGame.Extended.Collections
  3. {
  4. /// <summary>
  5. /// Arguments class for collections wanting to hand over an item in an event
  6. /// </summary>
  7. public class ItemEventArgs<T> : EventArgs
  8. {
  9. /// <summary>Initializes a new event arguments supplier</summary>
  10. /// <param name="item">Item to be supplied to the event handler</param>
  11. public ItemEventArgs(T item)
  12. {
  13. Item = item;
  14. }
  15. /// <summary>Obtains the collection item the event arguments are carrying</summary>
  16. public T Item { get; }
  17. }
  18. }