mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 移除了 IArchitectureRuntime 接口和 ArchitectureRuntime 类 - 在 ArchitectureContext 中添加了对 ICommandBus 和 IQueryBus 的依赖注入 - 修改 Architecture 类以使用 CommandBus 和 QueryBus 替代 Runtime - 更新 ArchitectureServices 以提供 CommandBus 和 QueryBus 服务 - 将组件初始化逻辑从 if-else 改为 switch 语句 - 更新 ContextAwareBase 以使用新的 GetFirstArchitectureContext 方法 - 添加了 CommandBus 和 QueryBus 的实现类 - 修复了 Godot 模块中系统获取的重复代码问题
15 lines
473 B
C#
15 lines
473 B
C#
namespace GFramework.Core.Abstractions.query;
|
|
|
|
/// <summary>
|
|
/// 查询总线接口,用于发送和处理查询请求
|
|
/// </summary>
|
|
public interface IQueryBus
|
|
{
|
|
/// <summary>
|
|
/// 发送查询请求并返回结果
|
|
/// </summary>
|
|
/// <typeparam name="TResult">查询结果的类型</typeparam>
|
|
/// <param name="query">要发送的查询对象</param>
|
|
/// <returns>查询结果</returns>
|
|
public TResult Send<TResult>(IQuery<TResult> query);
|
|
} |