From 9217c95bad3d986ef7878de2411a613b7173de58 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:42:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor(command):=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8DEmptyCommentInput=E4=B8=BAEmptyCommandInput?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将EmptyCommentInput类重命名为EmptyCommandInput以修正拼写错误 - 更新README.md文档中的相关引用和代码示例 - 移除文件开头的BOM字符 --- .../{EmptyCommentInput.cs => EmptyCommandInput.cs} | 4 ++-- GFramework.Core/command/README.md | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) rename GFramework.Core/command/{EmptyCommentInput.cs => EmptyCommandInput.cs} (76%) diff --git a/GFramework.Core/command/EmptyCommentInput.cs b/GFramework.Core/command/EmptyCommandInput.cs similarity index 76% rename from GFramework.Core/command/EmptyCommentInput.cs rename to GFramework.Core/command/EmptyCommandInput.cs index 2d4df6e..0743d3c 100644 --- a/GFramework.Core/command/EmptyCommentInput.cs +++ b/GFramework.Core/command/EmptyCommandInput.cs @@ -1,4 +1,4 @@ -using GFramework.Core.Abstractions.command; +using GFramework.Core.Abstractions.command; namespace GFramework.Core.command; @@ -9,4 +9,4 @@ namespace GFramework.Core.command; /// 该类实现了ICommandInput接口,作为命令模式中的输入参数载体 /// 通常用于不需要额外输入参数的简单命令操作 /// -public sealed class EmptyCommentInput : ICommandInput; \ No newline at end of file +public sealed class EmptyCommandInput : ICommandInput; diff --git a/GFramework.Core/command/README.md b/GFramework.Core/command/README.md index 139e1a2..a84e49a 100644 --- a/GFramework.Core/command/README.md +++ b/GFramework.Core/command/README.md @@ -174,17 +174,16 @@ var result = commandBus.Send(new CalculateDamageCommand(new CalculateDamageComma ## EmptyCommandInput - 空命令输入 -当命令不需要输入参数时,可以使用 [EmptyCommentInput](file:///d:/Project/Rider/GFramework/GFramework.Core/command/EmptyCommentInput.cs#L7-L11) -类: +当命令不需要输入参数时,可以使用 `EmptyCommandInput` 类: ```csharp -public class SimpleActionCommand : AbstractCommand +public class SimpleActionCommand : AbstractCommand { - public SimpleActionCommand(EmptyCommentInput input) : base(input) + public SimpleActionCommand(EmptyCommandInput input) : base(input) { } - protected override void OnExecute(EmptyCommentInput input) + protected override void OnExecute(EmptyCommandInput input) { // 执行简单操作,无需额外参数 this.SendEvent(new SimpleActionEvent());