예제 #1
0
 public virtual SpellCheckResponse SpellCheck(string text, SpellCheckModeOptions mode = SpellCheckModeOptions.None, string languageCode = "")
 {
     return(PolicyService.ExecuteRetryAndCapture400Errors(
                "SpellCheckService.SpellCheck",
                ApiKeys.BingSpellCheckRetryInSeconds,
                () =>
     {
         var result = SpellCheckRepository.SpellCheck(text, mode, languageCode);
         return result;
     },
                null));
 }
예제 #2
0
        public virtual SpellCheckResponse SpellCheck(string text, SpellCheckModeOptions mode = SpellCheckModeOptions.None, string languageCode = "")
        {
            try
            {
                var result = SpellCheckRepository.SpellCheck(text, mode, languageCode);

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

            return(null);
        }