ICommandContext.cs 626 B

12345678910111213141516
  1. #nullable enable
  2. namespace Terminal.Gui;
  3. /// <summary>
  4. /// Describes the context in which a <see cref="Command"/> is being invoked. <see cref="CommandContext{TBindingType}"/> inherits from this interface.
  5. /// When a <see cref="Command"/> is invoked,
  6. /// a context object is passed to Command handlers as an <see cref="ICommandContext"/> reference.
  7. /// </summary>
  8. /// <seealso cref="View.AddCommand(Command, CommandImplementation)"/>.
  9. public interface ICommandContext
  10. {
  11. /// <summary>
  12. /// The <see cref="Command"/> that is being invoked.
  13. /// </summary>
  14. public Command Command { get; set; }
  15. }