#nullable enable
namespace Terminal.Gui;
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
///
/// Provides context for a that is being invoked.
///
///
///
/// To define a that is invoked with context,
/// use .
///
///
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
public record struct CommandContext : ICommandContext
{
///
/// Initializes a new instance with the specified ,
///
///
///
///
public CommandContext (Command command, TBindingType? binding, object? data = null)
{
Command = command;
Binding = binding;
Data = data;
}
///
/// The keyboard or mouse minding that was used to invoke the , if any.
///
public TBindingType? Binding { get; set; }
///
public Command Command { get; set; }
///
public object? Data { get; set; }
}