示例#1
0
 protected virtual void Dispose(bool disposing)
 {
     if (entry != null)
     {
         entry.Dispose();
         entry = null;
     }
     if (timer != null)
     {
         timer.Dispose();
         timer = null;
     }
 }
示例#2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     if (webClient != null)
     {
         if (entry != null)
         {
             webClient.CancelAsync();
         }
         webClient.Dispose();
         webClient = null;
     }
     if (entry != null)
     {
         entry.Dispose();
         entry = null;
     }
 }