Example #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="indexDirectory">Index directory</param>
 /// <param name="menuMethod">Delegate method to get the Menu</param>
 /// <param name="database">Database id</param>
 /// <param name="langyuage">Language</param>
 public Indexer(string indexDirectory, GetMenuDelegate menuMethod, string database, string language)
 {
     _indexDirectory = indexDirectory;
     _menuMethod     = menuMethod;
     _database       = database;
     _language       = language;
 }
Example #2
0
 /// <summary>
 /// Initialize the SearchManager
 /// </summary>
 /// <param name="databaseBaseDirectory">Base directory for PX databases</param>
 /// <param name="menuMethod">Delegate method to get the Menu</param>
 /// <param name="cacheTime">Time in minutes that searchers will be cached</param>
 public void Initialize(string databaseBaseDirectory, GetMenuDelegate menuMethod, int cacheTime = 60, DefaultOperator defaultOperator = DefaultOperator.OR)
 {
     SetDatabaseBaseDirectory(databaseBaseDirectory);
     SetDbConfigWatcher();
     _menuMethod = menuMethod;
     _cacheTime  = cacheTime;
     PxModelManager.Current.Initialize(databaseBaseDirectory);
     SetDefaultOperator(defaultOperator);
 }