Exemplo n.º 1
0
        public LocalDatabase(string databaseName)
        {
            this.databaseName = databaseName.SantizeForDatabaseName();

            string archiveName = GetDatabaseFileName(databaseName);

            if (File.Exists(archiveName))
            {
                GzipHelper.DecompressFiles(archiveName);
                File.Delete(archiveName);
            }

            indexStore  = new IndexStore(databaseName);
            fileStore   = new FileDataStore(databaseName, indexStore);
            journal     = new FileJournal(databaseName, fileStore);
            memoryStore = new InMemoryDataStore(fileStore, journal.DirectoryPath);
        }