private SpellChecker(CultureInfo culture, Language language) { this.culture = culture; this.speller = new NativeMethods.Speller(language.LibraryFullPath); this.speller.AddLexicon(language.Lcid, language.LexiconFullPath); var libraryTimestamp = File.GetLastWriteTime(language.LibraryFullPath); var lexiconTimestamp = File.GetLastWriteTime(language.LexiconFullPath); this.dependantFilesHashCode = string.Concat(libraryTimestamp.ToString(CultureInfo.InvariantCulture), lexiconTimestamp.ToString(CultureInfo.InvariantCulture)).GetHashCode(); }
public void Dispose() { try { if (this.speller != null) { this.speller.Dispose(); } } finally { this.speller = null; this.wordSpellingCache = null; } }