/// <inheritdoc/> public void Add(string word) { _cacheLock.EnterWriteLock(); try { _core.Add(word); _cache.Clear(); // NOTE: when a new item is added the caches must be cleared as it will affect the suggestions } finally { _cacheLock.ExitWriteLock(); } }
public void Add(string word) { _core.Add(word); }
/// <summary> /// Treats the provided word as though it were part of the original dictionary. /// The word will no longer be considered misspelled, and will also be considered as a candidate for suggestions. /// </summary> /// <param name="word">The word to be added to the list of added words.</param> public void Add(string word) => spellChecker.Add(word);