/// <summary>
        /// 创建资源更新改变事件。
        /// </summary>
        /// <param name="name">资源名称。</param>
        /// <param name="downloadPath">资源下载后存放路径。</param>
        /// <param name="downloadUri">资源下载地址。</param>
        /// <param name="currentLength">当前下载大小。</param>
        /// <param name="zipLength">压缩后大小。</param>
        /// <returns>创建的资源更新改变事件。</returns>
        public static IResourceUpdateChangedEventArgs Create(string name, string downloadPath, string downloadUri, int currentLength, int zipLength)
        {
            IResourceUpdateChangedEventArgs resourceUpdateChangedEventArgs = ReferencePool.Acquire <IResourceUpdateChangedEventArgs>();

            resourceUpdateChangedEventArgs.Name          = name;
            resourceUpdateChangedEventArgs.DownloadPath  = downloadPath;
            resourceUpdateChangedEventArgs.DownloadUri   = downloadUri;
            resourceUpdateChangedEventArgs.CurrentLength = currentLength;
            resourceUpdateChangedEventArgs.ZipLength     = zipLength;
            return(resourceUpdateChangedEventArgs);
        }
Beispiel #2
0
 private void OnResourceUpdateChanged(object sender, IResourceUpdateChangedEventArgs e)
 {
     EventComponent.This.Fire(this, ResourceUpdateChangedEventArgs.Create(e));
 }