using GFramework.Game.Abstractions.Setting;
namespace GFramework.Game.Setting.Events;
///
/// 表示设置应用事件的泛型类
///
/// 设置节类型,必须实现ISettingsSection接口
public class SettingsApplyingEvent(T settings) : ISettingsChangedEvent
where T : ISettingsSection
{
///
/// 获取类型化的设置对象
///
public T TypedSettings { get; } = settings;
///
/// 获取设置类型的Type信息
///
public Type SettingsType => typeof(T);
///
/// 获取设置节基接口实例
///
public ISettingsSection Settings => TypedSettings;
///
/// 获取设置变更的时间戳
///
public DateTime ChangedAt { get; } = DateTime.UtcNow;
}