Exemple #1
0
        private void CreateMigrationFileBackup(UpdaterConfig config)
        {
            MigrationBackup backup = new MigrationBackup(config);

            backup.Progress += this.OnProgress;
            this.files       = backup.Backup();
        }
Exemple #2
0
        private void RestoreMigrationFileBackup(UpdaterConfig config)
        {
            MigrationRestore restore = new MigrationRestore(config, this.files);

            restore.Progress += this.OnProgress;
            restore.Run();
        }
        private IEnumerable<UpdateTask> GetTasks(UpdaterConfig config)
        {
            List<UpdateTask> tasks = new List<UpdateTask>();

            tasks.Add(new BackupDirectories(config));
            tasks.Add(new DownloadUpdate(config));
            tasks.Add(new ExtractDownload(config));
            tasks.Add(new RestoreDirectories(config));
            tasks.Add(new RunPatch(config));
            tasks.Add(new ReplaceApplicationFiles(config));

            return tasks;
        }
Exemple #4
0
        private IEnumerable <UpdateTask> GetTasks(UpdaterConfig config)
        {
            List <UpdateTask> tasks = new List <UpdateTask>();

            tasks.Add(new BackupDirectories(config));
            tasks.Add(new DownloadUpdate(config));
            tasks.Add(new ExtractDownload(config));
            tasks.Add(new RestoreDirectories(config));
            tasks.Add(new RunPatch(config));
            tasks.Add(new ReplaceApplicationFiles(config));

            return(tasks);
        }
        private UpdaterConfig GetConfig()
        {
            UpdaterConfig config = new UpdaterConfig();

            config.DownloadUrl = this.DownloadUrl;

            if (Config.IsDevelopmentMode())
            {
                config.DownloadUrl = this.GetFakeDownloadUrl();
            }

            config.ApplicationPath = Config.ApplicationPath;
            config.Migrate = Config.Migrate;
            config.TempPath = Config.TempPath;
            config.DirectoriesToBackup = this.ToBackup;
            return config;
        }
Exemple #6
0
        private UpdaterConfig GetConfig()
        {
            UpdaterConfig config = new UpdaterConfig();

            config.DownloadUrl = this.DownloadUrl;

            if (Config.IsDevelopmentMode())
            {
                config.DownloadUrl = this.GetFakeDownloadUrl();
            }

            config.ApplicationPath     = Config.ApplicationPath;
            config.Migrate             = Config.Migrate;
            config.TempPath            = Config.TempPath;
            config.DirectoriesToBackup = this.ToBackup;
            return(config);
        }
Exemple #7
0
        public void Update()
        {
            UpdaterConfig config = this.GetConfig();

            this.CreateMigrationFileBackup(config);

            var tasks = this.GetTasks(config);

            foreach (UpdateTask task in tasks)
            {
                task.Progress += this.OnProgress;
                task.Run();
            }

            this.RestoreMigrationFileBackup(config);
            this.OnProgress(new ProgressInfo(Titles.SuccessfullyUpdated, Labels.UpdateOperationCompletedSuccessfully));
        }
 protected UpdateTask(UpdaterConfig config)
 {
     this.Config = config;
 }
 private void CreateMigrationFileBackup(UpdaterConfig config)
 {
     MigrationBackup backup = new MigrationBackup(config);
     backup.Progress += this.OnProgress;
     this.files = backup.Backup();
 }
 private void RestoreMigrationFileBackup(UpdaterConfig config)
 {
     MigrationRestore restore = new MigrationRestore(config, this.files);
     restore.Progress += this.OnProgress;
     restore.Run();
 }
Exemple #11
0
 protected UpdateTask(UpdaterConfig config)
 {
     this.Config = config;
 }