Пример #1
0
 public TaskReport(TaskStatusInfo taskStatusInfo)
 {
     this.TaskId = taskStatusInfo.TaskId;
     this.TaskResult = taskStatusInfo.Result;
     this.TaskStatus = taskStatusInfo.Status;
     this.ErrorCode = taskStatusInfo.Error.Code;
     this.ErrorMessage = taskStatusInfo.Error.Message;
     this.TaskSteps = taskStatusInfo.TaskSteps;
 }
        internal virtual void HandleSyncTaskResponse(TaskStatusInfo taskStatus, string operationName)
        {
            string msg = string.Empty;
            TaskReport taskReport = new TaskReport(taskStatus);

            if (taskStatus.AsyncTaskAggregatedResult != AsyncTaskAggregatedResult.Succeeded)
            {
                msg = string.Format(Resources.FailureMessageCompleteJob, operationName);
                WriteObject(taskReport);
            }

            else
            {
                msg = string.Format(Resources.SuccessMessageCompleteJob, operationName);
                WriteObject(taskReport);
            }

            WriteVerbose(msg);
        }