//------------------------------------------------------------ // 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 DownloadAgentHelperErrorEventArgs : GameFrameworkEventArgs { /// /// 初始化下载代理辅助器错误事件的新实例。 /// public DownloadAgentHelperErrorEventArgs() { DeleteDownloading = false; ErrorMessage = null; } /// /// 获取是否需要删除正在下载的文件。 /// public bool DeleteDownloading { get; private set; } /// /// 获取错误信息。 /// public string ErrorMessage { get; private set; } /// /// 创建下载代理辅助器错误事件。 /// /// 是否需要删除正在下载的文件。 /// 错误信息。 /// 创建的下载代理辅助器错误事件。 public static DownloadAgentHelperErrorEventArgs Create(bool deleteDownloading, string errorMessage) { DownloadAgentHelperErrorEventArgs downloadAgentHelperErrorEventArgs = ReferencePool.Acquire(); downloadAgentHelperErrorEventArgs.DeleteDownloading = deleteDownloading; downloadAgentHelperErrorEventArgs.ErrorMessage = errorMessage; return downloadAgentHelperErrorEventArgs; } /// /// 清理下载代理辅助器错误事件。 /// public override void Clear() { DeleteDownloading = false; ErrorMessage = null; } } }