internal SpellCheckerChangedEventHandler(SpellChecker spellChecker)
 {
     _spellChecker = spellChecker;
     _eventArgs    = new SpellCheckerChangedEventArgs(_spellChecker);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 internal SpellCheckerChangedEventArgs(SpellChecker spellChecker)
 {
     SpellChecker = spellChecker;
 }