5 Commits

Author SHA1 Message Date
GeWuYou
2cfa78b91d feat(architecture): 添加架构阶段感知能力支持
- 在AbstractModel和AbstractSystem中添加OnArchitecturePhase虚方法实现
- 修改Architecture类移除IArchitectureLifecycle接口和OnPhase方法
- 更新IModel和ISystem接口继承IArchitecturePhaseAware接口
- 修改AbstractResourceFactorySystem实现IArchitecturePhaseAware接口
- 在测试类TestModel和TestSystem中添加OnArchitecturePhase方法实现
- 在项目文件中添加对生成器相关目录的排除配置
- 将ArchitecturePhase枚举引入到相关文件中
2025-12-31 12:42:06 +08:00
GwWuYou
f022f25ae6 refactor(architecture): 优化架构上下文清理机制
- 将测试专用的 ResetForTests 方法重命名为 Clear 并改为公共方法
- 在测试初始化时添加上下文清理确保测试环境纯净
- 在测试清理时使用 try-finally 确保架构正确销毁和上下文清理
- 修复了架构对象可能未正确清理的潜在问题
2025-12-30 19:03:58 +08:00
GwWuYou
0be919d8b1 feat(architecture): 添加架构上下文管理和绑定功能
- 在Architecture类中添加GameContext.Bind调用以绑定架构上下文
- 创建GameContext类用于管理架构上下文实例的注册和获取
- 实现架构上下文的绑定、获取、查找和移除功能
- 更新ContextAwareGenerator生成器以使用懒加载方式获取上下文
- 在测试架构中添加就绪事件注册功能
- 添加架构上下文按类型注册的测试用例
2025-12-29 23:11:50 +08:00
GwWuYou
56ff201f94 feat(architecture): 为架构服务添加上下文支持并改进事件系统
- 在 ArchitectureServices 中添加 SetContext 和 GetContext 方法
- 为 IArchitectureServices 接口添加 IContextAware 继承
- 在架构初始化过程中设置服务上下文
- 将事件系统的 GetEvent 方法替换为 GetOrAddEvent 方法
- 重构测试类添加测试装置和拆卸逻辑
- 为测试类添加 NonParallelizable 特性确保测试隔离
2025-12-29 21:42:52 +08:00
GwWuYou
8130cf7fb0 refactor(ioc): 重构依赖注入容器和模型上下文管理
- 将IocContainer的Init方法重命名为OnContextReady并设为protected override
- 重构AbstractModel中的Architecture字段为_context属性并实现IContextAware接口
- 移除GetArchitecture和SetArchitecture方法,添加GetContext和SetContext方法
- 为IModel接口添加IContextAware继承
- 添加TestArchitecture、TestModel和TestSystem测试类
- 创建ArchitectureInitializationTests测试用例验证组件初始化
- 更新项目文件添加NUnit包引用和测试项目配置
- 在解决方案文件中添加测试项目引用
2025-12-29 21:14:23 +08:00