Ejemplo n.º 1
0
        /// <summary>
        /// Loads all the word prediction extensions.
        /// 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">root directory</param>
        /// <returns>true on success</returns>
        public bool LoadExtensions(IEnumerable <String> extensionDirs)
        {
            bool retVal = true;

            if (_wordPredictors == null)
            {
                _wordPredictors = new WordPredictors();

                retVal = _wordPredictors.Load(extensionDirs);
            }

            return(retVal);
        }
Ejemplo 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"></param>
        /// <returns></returns>
        public bool Init(IEnumerable <String> extensionDirs)
        {
            bool retVal = true;

            if (_wordPredictors == null)
            {
                _wordPredictors = new WordPredictors();

                // add the null word predictor to our list of
                // recognizied word predictors
                IDescriptor descriptor = _nullWordPredictor.Descriptor;
                if (descriptor != null)
                {
                    _wordPredictors.Add(descriptor.Id, typeof(NullWordPredictor));
                }

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

            return(retVal);
        }
Ejemplo 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"></param>
        /// <returns></returns>
        public bool Init(IEnumerable<String> extensionDirs)
        {
            bool retVal = true;

            if (_wordPredictors == null)
            {
                _wordPredictors = new WordPredictors();

                // add the null word predictor to our list of
                // recognizied word predictors
                IDescriptor descriptor = _nullWordPredictor.Descriptor;
                if (descriptor != null)
                {
                    _wordPredictors.Add(descriptor.Id, typeof(NullWordPredictor));
                }

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

            return retVal;
        }