mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(command): 重命名EmptyCommentInput为EmptyCommandInput
- 将EmptyCommentInput类重命名为EmptyCommandInput以修正拼写错误 - 更新README.md文档中的相关引用和代码示例 - 移除文件开头的BOM字符
This commit is contained in:
parent
525685c62f
commit
9217c95bad
@ -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接口,作为命令模式中的输入参数载体
|
||||
/// 通常用于不需要额外输入参数的简单命令操作
|
||||
/// </remarks>
|
||||
public sealed class EmptyCommentInput : ICommandInput;
|
||||
public sealed class EmptyCommandInput : ICommandInput;
|
||||
@ -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<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());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user