Переглянути джерело

ICommandContext -> separate file

Tig 8 місяців тому
батько
коміт
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; }
+}