gewuyou ff553977e3 chore(license): 补齐 Apache-2.0 文件头治理
- 新增许可证文件头检查与修复脚本

- 补充维护者手动修复 PR 工作流和 CI 校验

- 更新贡献指南中的文件头说明

- 补齐仓库维护源码和配置文件的许可证声明
2026-05-03 19:39:49 +08:00

41 lines
1.1 KiB
C#

// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Core.Command;
namespace GFramework.Core.Tests.Command;
/// <summary>
/// 表示 <see cref="CommandExecutorTests" /> 使用的同步测试命令。
/// </summary>
public sealed class TestCommand : AbstractCommand<TestCommandInput>
{
/// <summary>
/// 初始化 <see cref="TestCommand" /> 的新实例。
/// </summary>
/// <param name="input">命令输入。</param>
public TestCommand(TestCommandInput input) : base(input)
{
}
/// <summary>
/// 获取一个值,该值指示命令是否已经执行。
/// </summary>
public bool Executed { get; private set; }
/// <summary>
/// 获取命令记录的执行结果值。
/// </summary>
public int ExecutedValue { get; private set; }
/// <summary>
/// 执行测试命令并记录同步执行状态。
/// </summary>
/// <param name="input">命令输入。</param>
protected override void OnExecute(TestCommandInput input)
{
Executed = true;
ExecutedValue = 42;
}
}