CommandEventArgs.cs 589 B

12345678910111213141516171819
  1. #nullable enable
  2. using System.ComponentModel;
  3. namespace Terminal.Gui;
  4. /// <summary>
  5. /// Event arguments for <see cref="Command"/> events. Set <see cref="HandledEventArgs.Handled"/> to
  6. /// <see langword="true"/> to indicate a command was handled.
  7. /// </summary>
  8. public class CommandEventArgs : HandledEventArgs
  9. {
  10. /// <summary>
  11. /// The context for the command, if any.
  12. /// </summary>
  13. /// <remarks>
  14. /// If <see langword="null"/> the command was invoked without context.
  15. /// </remarks>
  16. public required ICommandContext? Context { get; init; }
  17. }