using GFramework.Game.Abstractions.setting; namespace GFramework.Game.setting.events; /// /// 表示设置重置事件 /// /// 设置节类型 public class SettingsResetEvent : ISettingsChangedEvent where T : ISettingsSection { /// /// 构造函数 /// /// 重置前的设置 /// 重置后的新设置 public SettingsResetEvent(T oldSettings, T newSettings) { OldSettings = oldSettings; NewSettings = newSettings; } /// /// 获取重置前的设置 /// public T OldSettings { get; } /// /// 获取重置后的新设置 /// public T NewSettings { get; } /// /// 获取类型化的设置实例(返回新设置) /// public T TypedSettings => NewSettings; /// /// 获取设置类型 /// public Type SettingsType => typeof(T); /// /// 获取设置实例 /// public ISettingsSection Settings => NewSettings; /// /// 获取重置时间 /// public DateTime ChangedAt { get; } = DateTime.UtcNow; }