Artemis.Utilities.Updater.CheckChangelog C# (CSharp) Метод

CheckChangelog() публичный статический Метод

Checks to see if the program has updated and shows a dialog if so.
public static CheckChangelog ( MetroDialogService dialogService ) : System.Threading.Tasks.Task
dialogService Artemis.Services.MetroDialogService The dialog service to use for progress and result dialogs
Результат System.Threading.Tasks.Task
        public static async Task CheckChangelog(MetroDialogService dialogService)
        {
            var settings = SettingsProvider.Load<GeneralSettings>();
            var currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
            if ((settings.LastRanVersion != null) && (currentVersion > settings.LastRanVersion))
            {
                Logger.Info("Updated from {0} to {1}, showing changelog.", settings.LastRanVersion, currentVersion);

                // Ask the user whether he/she wants to see what's new
                var showChanges = await dialogService.
                    ShowQuestionMessageBox("New version installed",
                        $"Artemis has recently updated from version {settings.LastRanVersion} to {currentVersion}. \n" +
                        "Would you like to see what's new?");

                // If user wants to see changelog, show it to them
                if ((showChanges != null) && showChanges.Value)
                    await ShowChanges(dialogService, currentVersion);
            }

            settings.LastRanVersion = currentVersion;
            settings.Save();
        }