//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 loyalsoft. All rights reserved.
// Homepage: http://www.game7000.com/
// Feedback: http://www.game7000.com/
//------------------------------------------------------------
namespace GameFramework.Download
{
///
/// 下载代理辅助器更新数据大小事件。
///
public sealed class DownloadAgentHelperUpdateLengthEventArgs : GameFrameworkEventArgs
{
///
/// 初始化下载代理辅助器更新数据大小事件的新实例。
///
public DownloadAgentHelperUpdateLengthEventArgs()
{
DeltaLength = 0;
}
///
/// 获取下载的增量数据大小。
///
public int DeltaLength
{
get;
private set;
}
///
/// 创建下载代理辅助器更新数据大小事件。
///
/// 下载的增量数据大小。
/// 创建的下载代理辅助器更新数据大小事件。
public static DownloadAgentHelperUpdateLengthEventArgs Create(int deltaLength)
{
if (deltaLength <= 0)
{
throw new GameFrameworkException("Delta length is invalid.");
}
DownloadAgentHelperUpdateLengthEventArgs downloadAgentHelperUpdateLengthEventArgs = ReferencePool.Acquire();
downloadAgentHelperUpdateLengthEventArgs.DeltaLength = deltaLength;
return downloadAgentHelperUpdateLengthEventArgs;
}
///
/// 清理下载代理辅助器更新数据大小事件。
///
public override void Clear()
{
DeltaLength = 0;
}
}
}