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; }
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>(); }; }
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>(); }); }