private async void performUpdate()
        {
            commandPanel.IsEnabled = false;
            var installationStatus = new UpdateInstallationStatus();

            panelProgress.DataContext = installationStatus;
            var updateDirectory = initializeUpdateDirectory(Config.ApplicationStartupPath);

            installationStatus.Change("Скачивание обновления...", 10);
            Update update             = null;
            var    installationResult = await Task <UpdateStageResult> .Run(() =>
            {
                try
                {
                    update = UpdateService.DowloadUpdate(
                        Config.ApplicationName,
                        Config.ApplicationVersion,
                        Update.Version);
                    return(new UpdateStageResult());
                }
                catch (Exception error)
                {
                    return(new UpdateStageResult(error));
                }
            });

            processStageResult(installationResult, "скачивания обновления", updateDirectory, Update.Type != UpdateType.Required);

            installationStatus.Change("Установка обновления...", 60);
            installationResult = await Task <UpdateStageResult> .Run(() =>
            {
                try
                {
                    update.Install(updateDirectory);
                    return(new UpdateStageResult());
                }
                catch (Exception error)
                {
                    return(new UpdateStageResult(error));
                }
            });

            processStageResult(installationResult, "установки обновления", updateDirectory, false);

            installationStatus.Change("Обновление настроек программы...", 90);
            finalizeUpdateInstallation(Config, Update, updateDirectory);

            installationStatus.Change("Завершено", 100);
            commandPanel.IsEnabled = true;
            DialogResult           = true;
        }