GenericEventArgs.cs 897 B

123456789101112131415161718192021222324252627282930313233
  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. /// <summary>
  24. /// Initializes a new instance of the <see cref="GenericEventArgs{T}"/> class.
  25. /// </summary>
  26. public GenericEventArgs()
  27. {
  28. }
  29. }
  30. }