Пример #1
0
 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;
     }
 }
Пример #2
0
    /// <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;
        }
    }