123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //------------------------------------------------------------
- // Game Framework
- // Copyright © 2013-2021 loyalsoft. All rights reserved.
- // Homepage: http://www.game7000.com/
- // Feedback: http://www.game7000.com/
- //------------------------------------------------------------
- namespace GameFramework.Download
- {
- /// <summary>
- /// 下载代理辅助器完成事件。
- /// </summary>
- public sealed class DownloadAgentHelperCompleteEventArgs : GameFrameworkEventArgs
- {
- /// <summary>
- /// 初始化下载代理辅助器完成事件的新实例。
- /// </summary>
- public DownloadAgentHelperCompleteEventArgs()
- {
- Length = 0L;
- }
- /// <summary>
- /// 获取下载的数据大小。
- /// </summary>
- public long Length
- {
- get;
- private set;
- }
- /// <summary>
- /// 创建下载代理辅助器完成事件。
- /// </summary>
- /// <param name="length">下载的数据大小。</param>
- /// <returns>创建的下载代理辅助器完成事件。</returns>
- public static DownloadAgentHelperCompleteEventArgs Create(long length)
- {
- if (length < 0L)
- {
- throw new GameFrameworkException("Length is invalid.");
- }
- DownloadAgentHelperCompleteEventArgs downloadAgentHelperCompleteEventArgs = ReferencePool.Acquire<DownloadAgentHelperCompleteEventArgs>();
- downloadAgentHelperCompleteEventArgs.Length = length;
- return downloadAgentHelperCompleteEventArgs;
- }
- /// <summary>
- /// 清理下载代理辅助器完成事件。
- /// </summary>
- public override void Clear()
- {
- Length = 0L;
- }
- }
- }
|