//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: protected void prepareSampleDatabase(String version, org.neo4j.io.fs.FileSystemAbstraction fileSystem, org.neo4j.io.layout.DatabaseLayout databaseLayout, java.io.File databaseDirectory) throws java.io.IOException protected internal override void PrepareSampleDatabase(string version, FileSystemAbstraction fileSystem, DatabaseLayout databaseLayout, File databaseDirectory) { File resourceDirectory = FindFormatStoreDirectoryForVersion(version, databaseDirectory); File directory = databaseLayout.DatabaseDirectory(); fileSystem.DeleteRecursively(directory); fileSystem.Mkdirs(directory); fileSystem.CopyRecursively(resourceDirectory, directory); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: static void assertStoreConsistent(org.neo4j.io.fs.FileSystemAbstraction fs, java.io.File storeDir) throws Exception internal static void AssertStoreConsistent(FileSystemAbstraction fs, File storeDir) { File parent = storeDir.ParentFile; using (JobScheduler jobScheduler = new ThreadPoolJobScheduler(), PageCache pageCache = StandalonePageCacheFactory.createPageCache(fs, jobScheduler), TemporaryStoreDirectory tempStore = new TemporaryStoreDirectory(fs, pageCache, parent)) { fs.CopyRecursively(storeDir, tempStore.StoreDir()); (new CopiedStoreRecovery(Config.defaults(), newDependencies().kernelExtensions(), pageCache)).recoverCopiedStore(tempStore.DatabaseLayout()); ConsistencyCheckService.Result result = runConsistencyCheckTool(new string[] { storeDir.AbsolutePath }, new PrintStream(NULL_OUTPUT_STREAM), new PrintStream(NULL_OUTPUT_STREAM)); if (!result.Successful) { throw new Exception("Not consistent database in " + storeDir); } } }