internal SpellCheckerChangedEventHandler(SpellChecker spellChecker) { _spellChecker = spellChecker; _eventArgs = new SpellCheckerChangedEventArgs(_spellChecker); }
internal static List <SpellChecker.SpellingError> ToList(this RCW.IEnumSpellingError spellingErrors, SpellChecker spellChecker, string text, bool shouldSuppressCOMExceptions = true, bool shouldReleaseCOMObject = true) { if (spellingErrors == null) { throw new ArgumentNullException("spellingErrors"); } List <SpellChecker.SpellingError> list = new List <SpellChecker.SpellingError>(); try { for (;;) { RCW.ISpellingError spellingError = spellingErrors.Next(); if (spellingError == null) { break; } SpellChecker.SpellingError item = new SpellChecker.SpellingError(spellingError, spellChecker, text, shouldSuppressCOMExceptions, true); list.Add(item); } } catch (COMException obj) when(shouldSuppressCOMExceptions) { } finally { if (shouldReleaseCOMObject) { Marshal.ReleaseComObject(spellingErrors); } } return(list); }
internal SpellCheckerChangedEventArgs(SpellChecker spellChecker) { SpellChecker = spellChecker; }