mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 在 ArchitectureContext 中新增 SendCommandAsync 方法支持异步命令执行 - 在 CommandBus 中实现 SendAsync 方法处理异步命令的发送和执行 - 在 ContextAwareExtensions 中扩展 SendCommandAsync 扩展方法 - 更新 IArchitectureContext 接口定义异步命令方法契约 - 更新 ICommandBus 接口定义异步命令执行方法 - 新增 AbstractAsyncCommand 抽象类提供异步命令基类实现 - 定义 IAsyncCommand 接口规范异步命令的行为 contract
14 lines
291 B
C#
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();
|
|
} |