diff --git a/GFramework.Core.Abstractions/architecture/IArchitecture.cs b/GFramework.Core.Abstractions/architecture/IArchitecture.cs
index eaf0a22..7425123 100644
--- a/GFramework.Core.Abstractions/architecture/IArchitecture.cs
+++ b/GFramework.Core.Abstractions/architecture/IArchitecture.cs
@@ -92,7 +92,7 @@ public interface IArchitecture : IAsyncInitializable, IAsyncDestroyable, IInitia
///
/// 生命周期钩子实例
/// 注册的钩子实例
- IArchitectureLifecycle RegisterLifecycleHook(IArchitectureLifecycle hook);
+ IArchitectureLifecycleHook RegisterLifecycleHook(IArchitectureLifecycleHook hook);
///
/// 等待直到架构准备就绪的异步操作
diff --git a/GFramework.Core.Abstractions/architecture/IArchitectureLifecycle.cs b/GFramework.Core.Abstractions/architecture/IArchitectureLifecycleHook.cs
similarity index 54%
rename from GFramework.Core.Abstractions/architecture/IArchitectureLifecycle.cs
rename to GFramework.Core.Abstractions/architecture/IArchitectureLifecycleHook.cs
index 28b3948..54dc6f8 100644
--- a/GFramework.Core.Abstractions/architecture/IArchitectureLifecycle.cs
+++ b/GFramework.Core.Abstractions/architecture/IArchitectureLifecycleHook.cs
@@ -3,12 +3,13 @@
namespace GFramework.Core.Abstractions.architecture;
///
-/// 架构生命周期接口,定义了架构在不同阶段的回调方法
+/// 架构生命周期钩子接口,用于在架构的不同生命周期阶段执行自定义逻辑。
+/// 实现此接口的类可以监听架构阶段变化并访问相关的架构实例。
///
-public interface IArchitectureLifecycle
+public interface IArchitectureLifecycleHook
{
///
- /// 当架构进入指定阶段时触发的回调方法
+ /// 当架构进入指定阶段时触发的回调方法。
///
/// 当前的架构阶段
/// 相关的架构实例
diff --git a/GFramework.Core.Abstractions/architecture/IArchitectureModule.cs b/GFramework.Core.Abstractions/architecture/IArchitectureModule.cs
index 2dc62cd..5442830 100644
--- a/GFramework.Core.Abstractions/architecture/IArchitectureModule.cs
+++ b/GFramework.Core.Abstractions/architecture/IArchitectureModule.cs
@@ -4,7 +4,7 @@
/// 架构模块接口,继承自架构生命周期接口。
/// 定义了模块安装到架构中的标准方法。
///
-public interface IArchitectureModule : IArchitectureLifecycle, IArchitecturePhaseAware
+public interface IArchitectureModule
{
///
/// 将当前模块安装到指定的架构中。
diff --git a/GFramework.Core.Abstractions/architecture/IArchitecturePhaseAware.cs b/GFramework.Core.Abstractions/architecture/IArchitecturePhaseListener.cs
similarity index 51%
rename from GFramework.Core.Abstractions/architecture/IArchitecturePhaseAware.cs
rename to GFramework.Core.Abstractions/architecture/IArchitecturePhaseListener.cs
index c7bcfeb..3a8dce2 100644
--- a/GFramework.Core.Abstractions/architecture/IArchitecturePhaseAware.cs
+++ b/GFramework.Core.Abstractions/architecture/IArchitecturePhaseListener.cs
@@ -3,12 +3,13 @@
namespace GFramework.Core.Abstractions.architecture;
///
-/// 定义架构阶段感知接口,用于在架构的不同阶段执行相应的逻辑
+/// 架构阶段监听器接口,用于监听和响应架构生命周期中的不同阶段变化。
+/// 实现此接口的类可以在架构进入特定阶段时执行相应的逻辑处理。
///
-public interface IArchitecturePhaseAware
+public interface IArchitecturePhaseListener
{
///
- /// 当架构进入指定阶段时触发的回调方法
+ /// 当架构进入指定阶段时触发的回调方法。
///
/// 架构阶段枚举值,表示当前所处的架构阶段
void OnArchitecturePhase(ArchitecturePhase phase);
diff --git a/GFramework.Core.Abstractions/model/IModel.cs b/GFramework.Core.Abstractions/model/IModel.cs
index 4ec22d0..38f2f52 100644
--- a/GFramework.Core.Abstractions/model/IModel.cs
+++ b/GFramework.Core.Abstractions/model/IModel.cs
@@ -7,4 +7,4 @@ namespace GFramework.Core.Abstractions.model;
///
/// 模型接口,定义了模型的基本行为和功能
///
-public interface IModel : IContextAware, IArchitecturePhaseAware, IInitializable;
\ No newline at end of file
+public interface IModel : IContextAware, IArchitecturePhaseListener, IInitializable;
\ No newline at end of file
diff --git a/GFramework.Core.Abstractions/system/ISystem.cs b/GFramework.Core.Abstractions/system/ISystem.cs
index 7a8b415..0c91dcd 100644
--- a/GFramework.Core.Abstractions/system/ISystem.cs
+++ b/GFramework.Core.Abstractions/system/ISystem.cs
@@ -8,4 +8,4 @@ namespace GFramework.Core.Abstractions.system;
/// 系统接口,定义了系统的基本行为和功能
/// 该接口继承了多个框架相关的接口,提供了系统初始化和销毁能力
///
-public interface ISystem : IContextAware, IArchitecturePhaseAware, ILifecycle;
\ No newline at end of file
+public interface ISystem : IContextAware, IArchitecturePhaseListener, ILifecycle;
\ No newline at end of file
diff --git a/GFramework.Core/architecture/Architecture.cs b/GFramework.Core/architecture/Architecture.cs
index 33c4740..7e4ba9c 100644
--- a/GFramework.Core/architecture/Architecture.cs
+++ b/GFramework.Core/architecture/Architecture.cs
@@ -49,8 +49,6 @@ public abstract class Architecture(
var name = module.GetType().Name;
var logger = LoggerFactoryResolver.Provider.CreateLogger(name);
logger.Debug($"Installing module: {name}");
- RegisterLifecycleHook(module);
- Container.RegisterPlurality(module);
module.Install(this);
logger.Info($"Module installed: {name}");
return module;
@@ -126,7 +124,7 @@ public abstract class Architecture(
///
/// 生命周期感知对象列表
///
- private readonly List _lifecycleHooks = [];
+ private readonly List _lifecycleHooks = [];
///
/// 标记架构是否已初始化完成
@@ -201,7 +199,7 @@ public abstract class Architecture(
/// 新阶段
private void NotifyPhaseAwareObjects(ArchitecturePhase phase)
{
- foreach (var obj in Container.GetAll())
+ foreach (var obj in Container.GetAll())
{
_logger.Trace($"Notifying phase-aware object {obj.GetType().Name} of phase change to {phase}");
obj.OnArchitecturePhase(phase);
@@ -226,7 +224,7 @@ public abstract class Architecture(
///
/// 生命周期钩子实例
/// 注册的钩子实例
- public IArchitectureLifecycle RegisterLifecycleHook(IArchitectureLifecycle hook)
+ public IArchitectureLifecycleHook RegisterLifecycleHook(IArchitectureLifecycleHook hook)
{
if (CurrentPhase >= ArchitecturePhase.Ready && !Configuration.ArchitectureProperties.AllowLateRegistration)
throw new InvalidOperationException(
diff --git a/GFramework.Game/architecture/AbstractModule.cs b/GFramework.Game/architecture/AbstractModule.cs
deleted file mode 100644
index d4d2551..0000000
--- a/GFramework.Game/architecture/AbstractModule.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using GFramework.Core.Abstractions.architecture;
-using GFramework.Core.Abstractions.enums;
-
-namespace GFramework.Game.architecture;
-
-///
-/// 抽象模块类,实现IArchitectureModule接口,为架构模块提供基础功能
-///
-public abstract class AbstractModule : IArchitectureModule
-{
- ///
- /// 在指定架构阶段执行的操作
- ///
- /// 架构阶段枚举值
- /// 架构实例
- public virtual void OnPhase(ArchitecturePhase phase, IArchitecture architecture)
- {
- }
-
- ///
- /// 在架构阶段执行的操作
- ///
- /// 架构阶段枚举值
- public virtual void OnArchitecturePhase(ArchitecturePhase phase)
- {
- }
-
- ///
- /// 安装模块到架构中
- ///
- /// 要安装到的架构实例
- public abstract void Install(IArchitecture architecture);
-}
\ No newline at end of file