ICommandContext.cs 815 B

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