GeWuYou e7285b3426 feat(core): 添加异步命令支持功能
- 在 ArchitectureContext 中新增 SendCommandAsync 方法支持异步命令执行
- 在 CommandBus 中实现 SendAsync 方法处理异步命令的发送和执行
- 在 ContextAwareExtensions 中扩展 SendCommandAsync 扩展方法
- 更新 IArchitectureContext 接口定义异步命令方法契约
- 更新 ICommandBus 接口定义异步命令执行方法
- 新增 AbstractAsyncCommand 抽象类提供异步命令基类实现
- 定义 IAsyncCommand 接口规范异步命令的行为 contract
2026-01-17 16:03:00 +08:00

14 lines
291 B
C#

using System.Threading.Tasks;
using GFramework.Core.Abstractions.rule;
namespace GFramework.Core.Abstractions.command;
public interface IAsyncCommand : IContextAware
{
Task ExecuteAsync();
}
public interface IAsyncCommand<TResult> : IContextAware
{
Task<TResult> ExecuteAsync();
}