From 3f0dbb06b7864eff274a53f8dec555f7b8d889f1 Mon Sep 17 00:00:00 2001
From: GeWuYou <95328647+GeWuYou@users.noreply.github.com>
Date: Sat, 7 Feb 2026 21:02:04 +0800
Subject: [PATCH] =?UTF-8?q?remove(ui):=20=E7=A7=BB=E9=99=A4UI=E7=BC=93?=
=?UTF-8?q?=E5=AD=98=E5=92=8C=E8=BF=87=E6=B8=A1=E7=9B=B8=E5=85=B3=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E5=92=8C=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 删除了 IUiCacheStatistics 接口定义
- 删除了 IUiTransition 接口定义
- 删除了 UiCacheConfig 类定义及其相关方法
- 移除了UI缓存统计、过渡动画和缓存配置功能
---
.../ui/IUiCacheStatistics.cs | 32 ---------
.../ui/IUiTransition.cs | 22 -------
.../ui/UiCacheConfig.cs | 65 -------------------
3 files changed, 119 deletions(-)
delete mode 100644 GFramework.Game.Abstractions/ui/IUiCacheStatistics.cs
delete mode 100644 GFramework.Game.Abstractions/ui/IUiTransition.cs
delete mode 100644 GFramework.Game.Abstractions/ui/UiCacheConfig.cs
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