Files
MRCC/launcher/PCL-CE/PCL.Core/App/Tasks/ITask.cs
T
xyou f70b061d1a
CI / Go Backend (push) Canceled after 0s
feat: 项目初始化 + 3D方块世界原型 + AI助搭系统
初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器

HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块

Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚

AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
2026-08-08 14:07:56 +08:00

36 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Threading;
using System.Threading.Tasks;
namespace PCL.Core.App.Tasks;
/// <summary>
/// 任务状态改变事件
/// <param name="state">当前状态,将影响日志和 UI 显示效果</param>
/// <param name="message">状态消息</param>
/// </summary>
public delegate void TaskStateEvent(TaskState state, string message);
/// <summary>
/// 响应式任务接口<br/>
/// <b>NOTE</b>: 为确保运行时响应式模型的 hash 映射正常工作,若无特殊需求,请勿重写对象相等性实现如
/// <see cref="object.GetHashCode"/> 与 <see cref="object.Equals(object)"/>
/// </summary>
public interface ITask
{
/// <summary>
/// 任务标题
/// </summary>
public string Title { get; }
/// <summary>
/// 运行任务
/// </summary>
/// <param name="cancelToken">取消令牌</param>
public Task ExecuteAsync(CancellationToken cancelToken = default);
/// <summary>
/// 任务状态改变事件
/// </summary>
public event TaskStateEvent StateChanged;
}