public override string ExecuteCommand() { try { var contentResult = base.ExecuteCommand(); var result = JsonConvert.DeserializeObject <CreateSnapshotResponseDto>(contentResult); CreateSnapshotResponse = result.CreateSnapshotResponse; if (string.IsNullOrEmpty(CreateSnapshotResponse.JobId) == false) { Thread.Sleep(ConfigurationHelper.SnapshotCreatedDelayInSeconds); var queryAsyncJobResults = new QueryAsyncJobResultCommand(CreateSnapshotResponse.JobId); var jobContentResult = queryAsyncJobResults.ExecuteCommand(); if (string.IsNullOrEmpty(jobContentResult) == false) { QueryAsyncJobResultResponse = queryAsyncJobResults.QueryAsyncJobResultResponse; } } } catch (Exception e) { LogHelper.WriteAllLog(e.Message, LogHelper.LogType.Error); throw; } return(string.Empty); }
public override string ExecuteCommand() { var contentResult = string.Empty; try { contentResult = base.ExecuteCommand(); var result = JsonConvert.DeserializeObject <QueryAsyncJobResultResponseDto>(contentResult); QueryAsyncJobResultResponse = result.QueryAsyncJobResultResponse; } catch (Exception e) { LogHelper.WriteAllLog(e.Message, LogHelper.LogType.Error); throw; } return(contentResult); }