Esempio n. 1
0
        /// <summary>
        /// Initializes the SpellCheck manager by looking for
        /// SpellCheck extension dlls.
        /// The extension dirs parameter contains the root directory under
        /// which to search for SpellCheck DLL files.  The directories
        /// are specified in a comma delimited fashion.
        /// E.g.  Default, SomeDir
        /// These are relative to the application execution directory or
        /// to the directory where the ACAT framework has been installed.
        /// It recusrively walks the directories and looks for SpellCheck
        /// extension DLL files
        /// </summary>
        /// <param name="extensionDirs">list of directories</param>
        /// <returns>true on success</returns>
        public bool LoadExtensions(IEnumerable <String> extensionDirs)
        {
            bool retVal = true;

            if (_spellCheckers == null)
            {
                _spellCheckers = new SpellCheckers();

                retVal = _spellCheckers.Load(extensionDirs);
            }

            return(retVal);
        }
Esempio n. 2
0
        /// <summary>
        /// Initialize the Word Predictor manager by looking for
        /// Word predictor dlls.
        /// The extension dirs parameter contains the root directory under
        /// which to search for Word Predictor DLL files.  The directories
        /// are specified in a comma delimited fashion.
        /// E.g.  Base, Hawking
        /// These are relative to the application execution directory or
        /// to the directory where the ACAT framework has been installed.
        /// It recusrively walks the directories and looks for Word Predictor
        /// extension DLL files
        /// </summary>
        /// <param name="extensionDirs">list of directories</param>
        /// <returns></returns>
        public bool Init(IEnumerable <String> extensionDirs)
        {
            bool retVal = true;

            if (_spellCheckers == null)
            {
                _spellCheckers = new SpellCheckers();

                // add the null word predictor to our list of
                // recognizied word predictors
                var descriptor = _nullSpellChecker.Descriptor;
                if (descriptor != null)
                {
                    _spellCheckers.add(descriptor.Id, typeof(NullSpellChecker));
                }

                // walk through the directory to discover
                retVal = _spellCheckers.Load(extensionDirs);
            }

            return(retVal);
        }
Esempio n. 3
0
        /// <summary>
        /// Initialize the Word Predictor manager by looking for
        /// Word predictor dlls.
        /// The extension dirs parameter contains the root directory under
        /// which to search for Word Predictor DLL files.  The directories
        /// are specified in a comma delimited fashion.
        /// E.g.  Base, Hawking
        /// These are relative to the application execution directory or
        /// to the directory where the ACAT framework has been installed.
        /// It recusrively walks the directories and looks for Word Predictor
        /// extension DLL files
        /// </summary>
        /// <param name="extensionDirs">list of directories</param>
        /// <returns></returns>
        public bool Init(IEnumerable<String> extensionDirs)
        {
            bool retVal = true;

            if (_spellCheckers == null)
            {
                _spellCheckers = new SpellCheckers();

                // add the null word predictor to our list of
                // recognizied word predictors
                var descriptor = _nullSpellChecker.Descriptor;
                if (descriptor != null)
                {
                    _spellCheckers.add(descriptor.Id, typeof(NullSpellChecker));
                }

                // walk through the directory to discover
                retVal = _spellCheckers.Load(extensionDirs);
            }

            return retVal;
        }