void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings) { AboutPage.CheckForUpdatesIfEnabledAsync(spySettings).ContinueWith( delegate(Task <string> task) { if (task.Result != null) { updateAvailableDownloadUrl = task.Result; updateAvailablePanel.Visibility = Visibility.Visible; } }, TaskScheduler.FromCurrentSynchronizationContext() ); }
public void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false) { Task <string> result; if (forceCheck) { result = AboutPage.CheckForUpdatesAsync(spySettings); } else { result = AboutPage.CheckForUpdatesIfEnabledAsync(spySettings); } result.ContinueWith(task => AdjustUpdateUIAfterCheck(task, forceCheck), TaskScheduler.FromCurrentSynchronizationContext()); }
public async Task ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false) { // Don't check for updates if we're in an MSIX since they work differently if (WindowsVersionHelper.HasPackageIdentity) { return; } string downloadUrl; if (forceCheck) { downloadUrl = await AboutPage.CheckForUpdatesAsync(spySettings); } else { downloadUrl = await AboutPage.CheckForUpdatesIfEnabledAsync(spySettings); } AdjustUpdateUIAfterCheck(downloadUrl, forceCheck); }