Raven.Database.Storage.IndexDefinitionStorage.IndexDefinitionStorage C# (CSharp) Method

IndexDefinitionStorage() public method

public IndexDefinitionStorage ( InMemoryRavenConfiguration configuration, ITransactionalStorage transactionalStorage, string path, IEnumerable compiledGenerators, OrderedPartCollection extensions ) : System
configuration InMemoryRavenConfiguration
transactionalStorage ITransactionalStorage
path string
compiledGenerators IEnumerable
extensions OrderedPartCollection
return System
        public IndexDefinitionStorage(
            InMemoryRavenConfiguration configuration,
            ITransactionalStorage transactionalStorage,
            string path,
            IEnumerable<AbstractViewGenerator> compiledGenerators,
            OrderedPartCollection<AbstractDynamicCompilationExtension> extensions)
        {
            this.configuration = configuration;
            this.extensions = extensions; // this is used later in the ctor, so it must appears first
            this.path = Path.Combine(path, IndexDefDir);

            if (Directory.Exists(this.path) == false && configuration.RunInMemory == false)
                Directory.CreateDirectory(this.path);

            if (configuration.RunInMemory == false)
                ReadFromDisk();

            //compiled view generators always overwrite dynamic views
            ReadIndexesFromCatalog(compiledGenerators, transactionalStorage);

            newDefinitionsThisSession.Clear();
        }