예제 #1
0
 public override void ExecuteCmdlet()
 {
     try
     {
         ProcessParameters();
         if (WaitForComplete.IsPresent)
         {
             var taskStatusInfo = StorSimpleClient.DoBackup(deviceId, BackupPolicyId, backupNowRequest);
             HandleSyncTaskResponse(taskStatusInfo, "start");
         }
         else
         {
             var taskresult = StorSimpleClient.DoBackupAsync(deviceId, BackupPolicyId, backupNowRequest);
             HandleAsyncTaskResponse(taskresult, "start");
         }
     }
     catch (Exception exception)
     {
         this.HandleException(exception);
     }
 }