GenericEventArgs.cs 716 B

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