Exemplo n.º 1
0
        public static IAssimilate Lucene( this IAssimilate assimilate, Action<LuceneConfigurator> config )
        {
            var configurator = new LuceneConfigurator();
            config( configurator );
            var configuration = configurator.GetConfiguration();

            Assimilate.Dependencies( x => x.For<ILuceneConfiguration>().Use( configuration ) );

            return assimilate;
        }
Exemplo n.º 2
0
 public Action<DependencyConfigurator> Dependencies()
 {
     var configurator = new LuceneConfigurator();
     var configuration = configurator.GetConfiguration();
     return container =>
                {
                    container.For<ILuceneConfiguration>().Use( configuration );
                    container.For<ILuceneServiceFactory>().Use<LuceneServiceFactory>().AsSingleton();
                    container.For<IDocumentQueue>().Use<DocumentQueue>().AsSingleton();
                    container.For<BaseIndexingObserver>().Use<LuceneIndexingObserver>();
                    container.For<BaseSearchProvider>().Use<LuceneSearchProvider>();
                };
 }
Exemplo n.º 3
0
        public Action <DependencyConfigurator> Dependencies()
        {
            var configurator  = new LuceneConfigurator();
            var configuration = configurator.GetConfiguration();

            return(container =>
            {
                container.For <ILuceneConfiguration>().Use(configuration);
                container.For <ILuceneServiceFactory>().Use <LuceneServiceFactory>().AsSingleton();
                container.For <IDocumentQueue>().Use <DocumentQueue>().AsSingleton();
                container.For <BaseIndexingObserver>().Use <LuceneIndexingObserver>();
                container.For <BaseSearchProvider>().Use <LuceneSearchProvider>();
            });
        }