/// <summary> /// Gets word suggestions from either the <see cref="ExternalDictionary"/> or the given Hunspell dictionary set via the <see cref="LoadDictionary"/> method. /// </summary> /// <param name="word">The word.</param> /// <returns>A IEnumerable<System.String> containing the suggestions.</returns> private IEnumerable <string> DictionarySuggest(string word) { return(Dictionary == null?ExternalDictionary?.Suggest(word) : Dictionary.Suggest(word)); }
/// <summary> /// Checks if the word is spelled correctly using either the <see cref="ExternalDictionary"/> or the given Hunspell dictionary set via the <see cref="LoadDictionary"/> method. /// </summary> /// <param name="word">The word to check for.</param> /// <returns><c>true</c> if the word is spelled correctly, <c>false</c> otherwise.</returns> private bool DictionaryCheck(string word) { return((Dictionary?.Check(word) ?? ExternalDictionary?.Check(word)) == true); }