diff --git a/GFramework.Game.Abstractions/ui/IUiCacheStatistics.cs b/GFramework.Game.Abstractions/ui/IUiCacheStatistics.cs deleted file mode 100644 index 62364bb..0000000 --- a/GFramework.Game.Abstractions/ui/IUiCacheStatistics.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace GFramework.Game.Abstractions.ui; - -/// -/// UI缓存统计信息接口 -/// -public interface IUiCacheStatistics -{ - /// - /// 缓存总数 - /// - int CacheSize { get; } - - /// - /// 缓存命中次数 - /// - int HitCount { get; } - - /// - /// 缓存未命中次数 - /// - int MissCount { get; } - - /// - /// 命中率 - /// - double HitRate { get; } - - /// - /// 最近访问时间 - /// - DateTime? LastAccessTime { get; } -} \ No newline at end of file diff --git a/GFramework.Game.Abstractions/ui/IUiTransition.cs b/GFramework.Game.Abstractions/ui/IUiTransition.cs deleted file mode 100644 index 417d1a8..0000000 --- a/GFramework.Game.Abstractions/ui/IUiTransition.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace GFramework.Game.Abstractions.ui; - -/// -/// UI过渡动画接口 -/// 定义UI进入和退出时的动画效果 -/// -public interface IUiTransition -{ - /// - /// 播放进入动画 - /// - /// UI页面 - /// 异步任务,动画完成后完成 - Task PlayEnterAsync(IUiPageBehavior page); - - /// - /// 播放退出动画 - /// - /// UI页面 - /// 异步任务,动画完成后完成 - Task PlayExitAsync(IUiPageBehavior page); -} \ No newline at end of file diff --git a/GFramework.Game.Abstractions/ui/UiCacheConfig.cs b/GFramework.Game.Abstractions/ui/UiCacheConfig.cs deleted file mode 100644 index 9b5c482..0000000 --- a/GFramework.Game.Abstractions/ui/UiCacheConfig.cs +++ /dev/null @@ -1,65 +0,0 @@ -using GFramework.Game.Abstractions.enums; - -namespace GFramework.Game.Abstractions.ui; - -/// -/// UI缓存配置 -/// 用于配置UI实例的缓存行为 -/// -public class UiCacheConfig -{ - /// - /// 最大缓存数量 - /// - public int MaxCacheSize { get; set; } = 10; - - /// - /// 缓存淘汰策略 - /// - public CacheEvictionPolicy EvictionPolicy { get; set; } = CacheEvictionPolicy.Lru; - - /// - /// 访问后过期时间(可选,null 表示不启用) - /// - public TimeSpan? ExpireAfterAccess { get; set; } - - /// - /// 创建默认配置(LRU 策略,最大 10 个实例) - /// - public static UiCacheConfig Default => new() - { - MaxCacheSize = 10, - EvictionPolicy = CacheEvictionPolicy.Lru, - ExpireAfterAccess = null - }; - - /// - /// 创建 LRU 策略配置 - /// - /// 最大缓存数量 - /// 访问后过期时间 - public static UiCacheConfig Lru(int maxSize = 10, TimeSpan? expireAfter = null) - { - return new UiCacheConfig - { - MaxCacheSize = maxSize, - EvictionPolicy = CacheEvictionPolicy.Lru, - ExpireAfterAccess = expireAfter - }; - } - - /// - /// 创建 LFU 策略配置 - /// - /// 最大缓存数量 - /// 访问后过期时间 - public static UiCacheConfig Lfu(int maxSize = 10, TimeSpan? expireAfter = null) - { - return new UiCacheConfig - { - MaxCacheSize = maxSize, - EvictionPolicy = CacheEvictionPolicy.Lfu, - ExpireAfterAccess = expireAfter - }; - } -} \ No newline at end of file