private void DownloadProgress(object sender, ProgressChangedEventArgs e) { HttpDownload download = sender as HttpDownload; if (download != null && this.HttpDataReceived != null) this.HttpDataReceived(download.Guid, e); }
void DownloadProgress(object sender, ProgressChangedEventArgs e) { byte[] data = (byte[])e.UserState; if (_data == null) { _data = new byte[data.Length]; Array.Copy(data, 0, _data, 0, _data.Length); } else { byte[] b = new byte[_data.Length]; Array.Copy(_data, 0, b, 0, b.Length); _data = new byte[_data.Length + data.Length]; Array.Copy(b, 0, _data, 0, b.Length); Array.Copy(data, 0, _data, b.Length, data.Length); } }
void ResponseReceived(object sender, ProgressChangedEventArgs e) { HttpDownload download = sender as HttpDownload; if (download != null && this.HttpResponseReceived != null) this.HttpResponseReceived(download.Guid, e); }