private void RestoreClickExcute() { this.CurrentRestoreInfo = null; this.completeSize = 0; this.IsRestore = false; new Thread(() => { McsfRestoreLogger.WriteLog("[RestoreClickExcute]: begin."); SyncTaskUtility RestoreAsyncTask = new SyncTaskUtility(); if (string.IsNullOrWhiteSpace(this.BkpFilePath)) { this.IsRestore = true; McsfRestoreLogger.WriteLog("[RestoreClickExcute]: bapfile path is null."); return; } if (!File.Exists(this.BkpFilePath)) { this.IsRestore = true; McsfRestoreLogger.WriteLog(string.Format("[RestoreClickExcute]: bkpfile path {0} is not exists .", this.BkpFilePath)); return; } if (this.PackList == null || this.PackList.Count == 0) { this.IsRestore = true; McsfRestoreLogger.WriteLog(string.Format("[RestoreClickExcute]: PackList is null.")); return; } ResultType ret = RestoreAsyncTask.Execute <RestoreMainWorkflow>(this.BkpFilePath, this.PackList, this.restoreAction); McsfRestoreLogger.WriteLog("[RestoreClickExcute]: excute result is " + ret); McsfRestoreLogger.WriteLog("[RestoreClickExcute]: end."); this.IsRestore = true; }).Start(); }
public override void Execute() { string bkpFilePath = Arguments[0]; string compressedFilePath = Arguments[1]; var syncTask = new SyncTaskUtility(); syncTask.Execute <DeleteMessageWorkflow>(bkpFilePath, compressedFilePath); }