/// <summary> /// 创建资源更新成功事件。 /// </summary> /// <param name="name">资源名称。</param> /// <param name="downloadPath">资源下载后存放路径。</param> /// <param name="downloadUri">资源下载地址。</param> /// <param name="length">资源大小。</param> /// <param name="zipLength">压缩后大小。</param> /// <returns>创建的资源更新成功事件。</returns> public static IResourceUpdateSuccessEventArgs Create(string name, string downloadPath, string downloadUri, int length, int zipLength) { IResourceUpdateSuccessEventArgs resourceUpdateSuccessEventArgs = ReferencePool.Acquire <IResourceUpdateSuccessEventArgs>(); resourceUpdateSuccessEventArgs.Name = name; resourceUpdateSuccessEventArgs.DownloadPath = downloadPath; resourceUpdateSuccessEventArgs.DownloadUri = downloadUri; resourceUpdateSuccessEventArgs.Length = length; resourceUpdateSuccessEventArgs.ZipLength = zipLength; return(resourceUpdateSuccessEventArgs); }
private void OnResourceUpdateSuccess(object sender, IResourceUpdateSuccessEventArgs e) { EventComponent.This.Fire(this, ResourceUpdateSuccessEventArgs.Create(e)); }