示例#1
0
        public RemoteTask <List <OxfordDictionary> > GetAvailableDictionaries(RemoteCancellationToken ct)
        {
            OxfordDictClient.SetAuthentication(Config.AppId,
                                               Config.AppKey);

            return(OxfordDictClient.GetAvailableDictionaries(ct.Token()));
        }
示例#2
0
        public RemoteTask <LemmatronResult> LookupLemma(RemoteCancellationToken ct,
                                                        string word,
                                                        string language = "en-gb")
        {
            if (DictionaryConst.AllMonolingualLanguages.Contains(language) == false)
            {
                LogTo.Warning("Invalid language requested: {Language}", language);
                // ReSharper disable once LocalizableElement
                throw new ArgumentException($"Invalid language requested: {language}", nameof(language));
            }

            OxfordDictClient.SetAuthentication(Config.AppId,
                                               Config.AppKey);

            return(OxfordDictClient.LookupLemma(ct.Token(),
                                                word,
                                                language));
        }