mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-15 12:10:09 +00:00
42 lines
894 B
C#
42 lines
894 B
C#
|
|
namespace YooAsset
|
|
{
|
|
/// <summary>
|
|
/// 清理缓存操作基类
|
|
/// </summary>
|
|
internal abstract class BCClearCacheOperation : AsyncOperationBase
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 清理缓存完成操作
|
|
/// </summary>
|
|
internal class BCClearCacheCompleteOperation : BCClearCacheOperation
|
|
{
|
|
private readonly string _error;
|
|
|
|
public BCClearCacheCompleteOperation()
|
|
{
|
|
_error = null;
|
|
}
|
|
public BCClearCacheCompleteOperation(string error)
|
|
{
|
|
_error = error;
|
|
}
|
|
protected override void InternalStart()
|
|
{
|
|
if (string.IsNullOrEmpty(_error))
|
|
{
|
|
SetResult();
|
|
}
|
|
else
|
|
{
|
|
SetError(_error);
|
|
}
|
|
}
|
|
protected override void InternalUpdate()
|
|
{
|
|
}
|
|
}
|
|
}
|