refactor(command): 重命名EmptyCommentInput为EmptyCommandInput

- 将EmptyCommentInput类重命名为EmptyCommandInput以修正拼写错误
- 更新README.md文档中的相关引用和代码示例
- 移除文件开头的BOM字符
This commit is contained in:
GeWuYou 2026-01-12 14:42:22 +08:00
parent 525685c62f
commit 9217c95bad
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,4 @@
using GFramework.Core.Abstractions.command; using GFramework.Core.Abstractions.command;
namespace GFramework.Core.command; namespace GFramework.Core.command;
@ -9,4 +9,4 @@ namespace GFramework.Core.command;
/// 该类实现了ICommandInput接口作为命令模式中的输入参数载体 /// 该类实现了ICommandInput接口作为命令模式中的输入参数载体
/// 通常用于不需要额外输入参数的简单命令操作 /// 通常用于不需要额外输入参数的简单命令操作
/// </remarks> /// </remarks>
public sealed class EmptyCommentInput : ICommandInput; public sealed class EmptyCommandInput : ICommandInput;

View File

@ -174,17 +174,16 @@ var result = commandBus.Send(new CalculateDamageCommand(new CalculateDamageComma
## EmptyCommandInput - 空命令输入 ## EmptyCommandInput - 空命令输入
当命令不需要输入参数时,可以使用 [EmptyCommentInput](file:///d:/Project/Rider/GFramework/GFramework.Core/command/EmptyCommentInput.cs#L7-L11) 当命令不需要输入参数时,可以使用 `EmptyCommandInput` 类:
类:
```csharp ```csharp
public class SimpleActionCommand : AbstractCommand<EmptyCommentInput> public class SimpleActionCommand : AbstractCommand<EmptyCommandInput>
{ {
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()); this.SendEvent(new SimpleActionEvent());