GenericEventArgs.cs 711 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace MediaBrowser.Model.Events
  3. {
  4. /// <summary>
  5. /// Provides a generic EventArgs subclass that can hold any kind of object.
  6. /// </summary>
  7. /// <typeparam name="T"></typeparam>
  8. public class GenericEventArgs<T> : EventArgs
  9. {
  10. /// <summary>
  11. /// Gets or sets the argument.
  12. /// </summary>
  13. /// <value>The argument.</value>
  14. public T Argument { get; set; }
  15. /// <summary>
  16. /// Initializes a new instance of the <see cref="GenericEventArgs{T}"/> class.
  17. /// </summary>
  18. /// <param name="arg">The argument.</param>
  19. public GenericEventArgs(T arg)
  20. {
  21. Argument = arg;
  22. }
  23. }
  24. }