--- phase: "03-" plan: 04 subsystem: Gateway tags: [gateway, di, registration, extensions] dependency_graph: requires: [IClusterStore (来自计划 03)] provides: [更新的 DI 注册] affects: [Extensions, GatewayExtensions] tech_stack: added: [] patterns: - ASP.NET Core DI 注册 - 泛型 DbContext 约束 key_files: created: [] modified: - Fengling.Platform.Infrastructure/Extensions.cs - Fengling.Platform.Infrastructure/GatewayExtensions.cs deleted: [] decisions: - "IClusterStore 注册为 Scoped 服务" - "AddPlatformCore 和 AddGatewayCore 均注册 IClusterStore" metrics: duration: "包含在计划 03 中" completed_date: "2026-03-03" requirements_completed: [GATEWAY-RESTRUCTURE-07] --- # 阶段 03 - 计划 04: 网关 DI 更新总结 ## 一句话概述 更新 Extensions.cs 和 GatewayExtensions.cs 中的 DI 注册,将 IClusterStore/ClusterStore 替代已废弃的 IInstanceStore。 ## 已完成任务 | 任务 | 名称 | 状态 | 提交 | |------|------|------|------| | 1 | 更新 Extensions.cs | ✅ 完成 | a655813 | | 2 | 更新 GatewayExtensions.cs | ✅ 完成 | a655813 | **注意:** 任务作为计划 03 的偏差修复的一部分完成(规则 2 - 自动添加缺失功能)。 ## 验证结果 - [x] Extensions.cs 在 AddPlatformCore 中注册 IClusterStore - [x] GatewayExtensions.cs 在 AddGatewayCore 中注册 IClusterStore - [x] IInstanceStore 引用已移除 - [x] 构建通过,0 个错误 ## 计划偏差 **作为计划 03 偏差修复的一部分完成:** - Wave 2 代理在基础设施更新期间主动更新了 DI 注册文件 - 这是修复因删除 IInstanceStore 引用导致的构建错误所必需的 - 无需额外提交 - 变更已包含在计划 03 的提交 `a655813` 中 ## 认证门槛 无。 ## 备注 DI 注册更新在逻辑上是基础设施更新的一部分,因为: 1. IClusterStore/ClusterStore 在计划 03 中创建 2. Extensions 必须立即引用新的 Store 才能编译 3. 拆分提交会产生一个损坏的中间状态 --- *阶段: 03-* *完成时间: 2026-03-03*