EventArgs.cs 902 B

123456789101112131415161718192021
  1. namespace Terminal.Gui.App;
  2. #pragma warning disable CS1711
  3. /// <summary>
  4. /// Provides data for events that convey the current value of a property or other value in a cancellable workflow (CWP).
  5. /// </summary>
  6. /// <remarks>
  7. /// Used for workflows where the current value of a property or value is being conveyed, such as
  8. /// when a property has been changed.
  9. /// </remarks>
  10. /// <typeparam name="T">The type of the value.</typeparam>
  11. public class EventArgs<T> : EventArgs /*where T : notnull*/
  12. {
  13. /// <summary>Initializes a new instance of the <see cref="EventArgs{T}"/> class.</summary>
  14. /// <param name="currentValue">The current value of the property.</param>
  15. /// <typeparam name="T">The type of the value.</typeparam>
  16. public EventArgs (in T currentValue) { Value = currentValue; }
  17. /// <summary>The current value of the property.</summary>
  18. public T Value { get; }
  19. }