Просмотр исходного кода

ICommandContext -> separate file

Tig 8 месяцев назад
Родитель
Сommit
dd36aa567d
1 измененных файлов с 19 добавлено и 0 удалено
  1. 19 0
      Terminal.Gui/Input/ICommandContext.cs

+ 19 - 0
Terminal.Gui/Input/ICommandContext.cs

@@ -0,0 +1,19 @@
+#nullable enable
+namespace Terminal.Gui;
+
+/// <summary>
+///     Describes the context in which a <see cref="Command"/> is being invoked.
+/// </summary>
+public interface ICommandContext
+{
+    /// <summary>
+    ///     The <see cref="Command"/> that is being invoked.
+    /// </summary>
+    public Command Command { get; set; }
+
+    // TODO: Remove this property. With CommandContext<TBindingType> being a generic type, there should be no need for arbitrary data.
+    /// <summary>
+    ///     Arbitrary data.
+    /// </summary>
+    public object? Data { get; set; }
+}