public static OperationStatusResult CreateCancelledOperation(ICommunicationResult apiCallResult)
        {
            var result = new OperationStatusResult(apiCallResult);

            result.OperationState = OperationStateType.Cancelled;
            return(result);
        }
        public static OperationStatusResult CreateTimeoutOperation(ICommunicationResult apiCallResult)
        {
            var result = new OperationStatusResult(apiCallResult);

            result.OperationState = OperationStateType.TimedOut;
            return(result);
        }
        public async Task <OperationStatusResult> CheckOperationStatus()
        {
            _analysisResults.AnalysisSettings.ConfigurationSettings.DiagnosticLogger.LogInfo("About to query operation status", "OperationStatusQuery");
            var commsEngine   = _analysisResults.AnalysisSettings.CommunicationEngine;
            var serviceResult = await commsEngine.CallServiceAsync(_analysisResults.TextAnalyticTopicAnalysis.AnalysisResult.ApiCallResult.OperationLocationUri.AbsoluteUri, ApiActionCategory.TextAnalytics);

            var result = new OperationStatusResult(serviceResult);

            return(result);
        }