namespace Terminal.Gui.Examples;
///
/// Defines keystrokes to be automatically injected when the example is run in demo or test mode.
/// Apply this attribute to an assembly to specify automated input sequences for demonstration or testing purposes.
///
///
///
/// Multiple instances of this attribute can be applied to a single assembly to define a sequence
/// of keystroke injections. The property controls the execution sequence.
///
///
///
///
/// [assembly: ExampleDemoKeyStrokes(RepeatKey = "CursorDown", RepeatCount = 5, Order = 1, DelayMs = 100)]
/// [assembly: ExampleDemoKeyStrokes(KeyStrokes = new[] { "Enter" }, Order = 2, DelayMs = 200)]
///
///
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
public class ExampleDemoKeyStrokesAttribute : System.Attribute
{
///
/// Gets or sets an array of keystroke names to inject.
/// Each string should be a valid key name that can be parsed by .
///
public string []? KeyStrokes { get; set; }
///
/// Gets or sets the name of a single key to repeat multiple times.
/// This is a convenience for repeating the same keystroke.
///
public string? RepeatKey { get; set; }
///
/// Gets or sets the number of times to repeat .
/// Only used when is specified.
///
public int RepeatCount { get; set; } = 1;
///
/// Gets or sets the delay in milliseconds before injecting these keystrokes.
///
public int DelayMs { get; set; } = 0;
///
/// Gets or sets the order in which this keystroke sequence should be executed
/// relative to other instances.
///
public int Order { get; set; } = 0;
}