2026-01-27 17:32:20 +08:00
|
|
|
|
|
|
|
|
namespace YooAsset
|
|
|
|
|
{
|
2026-02-05 16:14:50 +08:00
|
|
|
/// <summary>
|
2026-02-25 19:03:42 +08:00
|
|
|
/// 清理缓存操作基类
|
2026-02-05 16:14:50 +08:00
|
|
|
/// </summary>
|
2026-02-25 19:03:42 +08:00
|
|
|
internal abstract class BCClearCacheOperation : AsyncOperationBase
|
2026-01-27 17:32:20 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-05 16:14:50 +08:00
|
|
|
/// <summary>
|
2026-02-25 19:03:42 +08:00
|
|
|
/// 清理缓存完成操作
|
2026-02-05 16:14:50 +08:00
|
|
|
/// </summary>
|
2026-02-25 19:03:42 +08:00
|
|
|
internal class BCClearCacheCompleteOperation : BCClearCacheOperation
|
2026-01-27 17:32:20 +08:00
|
|
|
{
|
|
|
|
|
private readonly string _error;
|
|
|
|
|
|
2026-02-25 19:03:42 +08:00
|
|
|
public BCClearCacheCompleteOperation()
|
2026-01-27 17:32:20 +08:00
|
|
|
{
|
|
|
|
|
_error = null;
|
|
|
|
|
}
|
2026-02-25 19:03:42 +08:00
|
|
|
public BCClearCacheCompleteOperation(string error)
|
2026-01-27 17:32:20 +08:00
|
|
|
{
|
|
|
|
|
_error = error;
|
|
|
|
|
}
|
2026-03-09 17:58:49 +08:00
|
|
|
protected override void InternalStart()
|
2026-01-27 17:32:20 +08:00
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(_error))
|
|
|
|
|
{
|
2026-03-09 17:58:49 +08:00
|
|
|
SetResult();
|
2026-01-27 17:32:20 +08:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2026-03-09 17:58:49 +08:00
|
|
|
SetError(_error);
|
2026-01-27 17:32:20 +08:00
|
|
|
}
|
|
|
|
|
}
|
2026-03-09 17:58:49 +08:00
|
|
|
protected override void InternalUpdate()
|
2026-01-27 17:32:20 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|