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