瀏覽代碼

ICommandContext -> separate file

Tig 7 月之前
父節點
當前提交
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; }
+}