public virtual DetectLanguageResponse DetectLanguage(string text) { try { var result = Task.Run(async() => await ContentModeratorRepository.DetectLanguageAsync(text)).Result; return(result); } catch (Exception ex) { Logger.Error("ContentModeratorService.DetectLanguage failed", this, ex); } return(null); }