mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 03:04:29 +08:00
- 在AbstractModel和AbstractSystem中添加OnArchitecturePhase虚方法实现 - 修改Architecture类移除IArchitectureLifecycle接口和OnPhase方法 - 更新IModel和ISystem接口继承IArchitecturePhaseAware接口 - 修改AbstractResourceFactorySystem实现IArchitecturePhaseAware接口 - 在测试类TestModel和TestSystem中添加OnArchitecturePhase方法实现 - 在项目文件中添加对生成器相关目录的排除配置 - 将ArchitecturePhase枚举引入到相关文件中
40 lines
852 B
C#
40 lines
852 B
C#
using GFramework.Core.Abstractions.architecture;
|
|
using GFramework.Core.Abstractions.enums;
|
|
using GFramework.Core.Abstractions.model;
|
|
|
|
namespace GFramework.Core.Tests.model;
|
|
|
|
/// <summary>
|
|
/// 测试模型类,用于框架测试目的
|
|
/// </summary>
|
|
public sealed class TestModel : IModel
|
|
{
|
|
private IArchitectureContext _context = null!;
|
|
|
|
/// <summary>
|
|
/// 获取模型是否已初始化的状态
|
|
/// </summary>
|
|
public bool Inited { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 初始化模型
|
|
/// </summary>
|
|
public void Init()
|
|
{
|
|
Inited = true;
|
|
}
|
|
|
|
public void SetContext(IArchitectureContext context)
|
|
{
|
|
_context = context;
|
|
}
|
|
|
|
public IArchitectureContext GetContext()
|
|
{
|
|
return _context;
|
|
}
|
|
|
|
public void OnArchitecturePhase(ArchitecturePhase phase)
|
|
{
|
|
}
|
|
} |