private void RemoveSearchProperties(XmlConfigurationSource configSource) { var cfg = configSource.GetConfiguration(typeof(ActiveRecordBase)); foreach (var prop in searchConfig) { cfg.Children.Remove(prop); } }
private void AddSearchProperties(XmlConfigurationSource configSource) { searchConfig = new MutableConfiguration[3]; searchConfig[0] = new MutableConfiguration("hibernate.search.default.directory_provider", "NHibernate.Search.Storage.FSDirectoryProvider, NHibernate.Search"); searchConfig[1] = new MutableConfiguration("hibernate.search.default.indexBase", "~/index"); searchConfig[2] = new MutableConfiguration("hibernate.search.analyzer", "Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"); var cfg = configSource.GetConfiguration(typeof(ActiveRecordBase)); cfg.Children.AddRange(searchConfig); }