private void OnFinish() { lock (lock_object) { if (Content != null) { Content.State = DownloadContent.emState.Completed; Content.Close(); Content = null; } if (_httpWebRequest != null) { _httpWebRequest.Abort(); _httpWebRequest = null; } IsDone = true; } }
/// <summary> /// 下载完成 /// </summary> void OnFinish() { lock (lock_obj_) { if (content_ != null) { content_.State = DownloadContent.emState.Completed; content_.Close(); content_ = null; } if (http_request_ != null) { http_request_.Abort(); http_request_ = null; } IsDone = true; } }