Fetch() public method

Fetch the information on the latest version of yaircc.
public Fetch ( ) : bool
return bool
示例#1
0
 /// <summary>
 /// Handles the DoWork event of System.ComponentModel.BackgroundWorker.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The event arguments.</param>
 private void UpdateCheckBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     ProgramUpdate update = new ProgramUpdate();
     if (update.Fetch())
     {
         Version executingVersion = Assembly.GetExecutingAssembly().GetName().Version;
         Version updateVersion = new Version(update.Version);
         if (executingVersion < updateVersion)
         {
             update.FetchReleaseNotes(executingVersion);
             e.Result = update;
         }
         else
         {
             e.Result = null;
         }
     }
     else
     {
         e.Result = false;
     }
 }