mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 移除 SettingsModel 中的 All() 方法,避免同时实现两个接口的设置被重复返回 - 添加 AllApplicators() 方法用于获取所有可应用设置 - 添加 AllData() 方法用于获取所有设置数据 - 修改 SettingsSystem.ApplyAll() 方法,直接遍历可应用设置而非设置节 - 更新 ISettingsModel 接口定义,将 All() 方法拆分为 AllData() 和 AllApplicators() - 移除 SettingsSystem 中的 Apply(Type) 和 Apply(IEnumerable<Type>) 重载方法 - 更新 Apply<T>() 泛型约束从 ISettingsSection 改为 IApplyAbleSettings - 移除注册时对 ISettingsData 的自动注册逻辑,保持职责分离
19 lines
494 B
C#
19 lines
494 B
C#
using GFramework.Core.Abstractions.system;
|
|
|
|
namespace GFramework.Game.Abstractions.setting;
|
|
|
|
/// <summary>
|
|
/// 定义设置系统的接口,提供应用各种设置的方法
|
|
/// </summary>
|
|
public interface ISettingsSystem : ISystem
|
|
{
|
|
/// <summary>
|
|
/// 应用所有可应用的设置
|
|
/// </summary>
|
|
Task ApplyAll();
|
|
|
|
/// <summary>
|
|
/// 应用指定类型的设置(泛型版本)
|
|
/// </summary>
|
|
Task Apply<T>() where T : class, IApplyAbleSettings;
|
|
} |