Esempio n. 1
0
 public virtual NewsSearchResponse NewsSearch(string text, int countOffset = 0, string languageCode = "", SafeSearchOptions safeSearch = SafeSearchOptions.Off)
 {
     return(PolicyService.ExecuteRetryAndCapture400Errors(
                "NewsSearchService.NewsSearch",
                ApiKeys.BingSearchRetryInSeconds,
                () =>
     {
         var result = NewsSearchRepository.NewsSearch(text, countOffset, languageCode, safeSearch);
         return result;
     },
                null));
 }
        public virtual NewsSearchResponse NewsSearch(string text, int countOffset = 0, string languageCode = "", SafeSearchOptions safeSearch = SafeSearchOptions.Off)
        {
            try {
                var result = NewsSearchRepository.NewsSearch(text, countOffset, languageCode, safeSearch);

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

            return(null);
        }