CommandEventArgs.cs 578 B

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