public void Initialize()
        {
            LuceneDataProvider.RegisterCacheWarmingCallback(UpdatePackageCount, () => new LucenePackage(FileSystem));

            UpdatePackageCount(LucenePackages);

            frameworkCompatibilityTool.InitializeKnownFrameworkShortNamesFromIndex(LuceneDataProvider);
        }
        public void RegisterCacheWarmingCallback()
        {
            var directory = new RAMDirectory();
            var writer    = new IndexWriter(directory, new CaseInsensitiveKeywordAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
            var provider  = new LuceneDataProvider(directory, new SimpleAnalyzer(), Version.LUCENE_29, writer);

            var count = -1;

            provider.RegisterCacheWarmingCallback <Item>(q => count = q.Count());

            provider.Context.Reload();

            Assert.That(count, Is.EqualTo(0));
        }
        public void RegisterCacheWarmingCallback()
        {
            var directory = new RAMDirectory();
            var writer = new IndexWriter(directory, new CaseInsensitiveKeywordAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
            var provider = new LuceneDataProvider(directory, new SimpleAnalyzer(), Version.LUCENE_29, writer);

            var count = -1;

            provider.RegisterCacheWarmingCallback<Item>(q => count = q.Count());

            provider.Context.Reload();

            Assert.That(count, Is.EqualTo(0));
        }