mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(architecture): 调整架构阶段访问权限并添加可扩展接口
- 将Architecture.CurrentPhase属性改为私有访问 - 新增IArchitectureExtensible接口提供模块安装和生命周期钩子注册功能 - 实现架构模块安装和生命周期钩子注册的扩展能力 - 优化架构的可扩展性和模块化设计
This commit is contained in:
parent
32a1734659
commit
c1037c7fe2
@ -76,7 +76,7 @@ public abstract class Architecture<T> : IArchitecture
|
||||
/// <summary>
|
||||
/// 当前架构的阶段
|
||||
/// </summary>
|
||||
public ArchitecturePhase CurrentPhase { get; private set; }
|
||||
private ArchitecturePhase CurrentPhase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 静态只读字段,用于延迟初始化架构实例
|
||||
|
||||
20
GFramework.Core/architecture/IArchitectureExtensible.cs
Normal file
20
GFramework.Core/architecture/IArchitectureExtensible.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace GFramework.Core.architecture;
|
||||
|
||||
/// <summary>
|
||||
/// 可扩展架构接口,继承自IArchitecture接口,提供模块安装和生命周期钩子注册功能
|
||||
/// </summary>
|
||||
public interface IArchitectureExtensible : IArchitecture
|
||||
{
|
||||
/// <summary>
|
||||
/// 安装架构模块
|
||||
/// </summary>
|
||||
/// <param name="module">要安装的架构模块实例</param>
|
||||
void InstallModule(IArchitectureModule module);
|
||||
|
||||
/// <summary>
|
||||
/// 注册架构生命周期钩子
|
||||
/// </summary>
|
||||
/// <param name="hook">要注册的架构生命周期钩子实例</param>
|
||||
void RegisterLifecycleHook(IArchitectureLifecycle hook);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user