예제 #1
0
 public virtual SentimentResponse GetSentiment(SentimentRequest request)
 {
     return(PolicyService.ExecuteRetryAndCapture400Errors(
                "TextAnalyticsService.GetSentiment",
                ApiKeys.TextAnalyticsRetryInSeconds,
                () =>
     {
         var result = TextAnalyticsRepository.GetSentiment(request);
         return result;
     },
                null));
 }
예제 #2
0
        public virtual SentimentResponse GetSentiment(SentimentRequest request)
        {
            try
            {
                var result = TextAnalyticsRepository.GetSentiment(request);

                return(result);
            }
            catch (Exception ex)
            {
                Logger.Error("SentimentService.GetSentiment failed", this, ex);
            }

            return(null);
        }