コード例 #1
0
ファイル: GridExportInstruction.cs プロジェクト: xyuan/BoSSS
        /// <summary>
        /// Creates a plotting instruction with default configuration options.
        /// </summary>
        /// <param name="grid">
        /// The grid to be plotted.
        /// </param>
        public GridExportInstruction(IGridInfo grid)
        {
            this.Grid = grid;

            // because hacks work. (TODO)
            IFileSystemDriver fsdrv = new StandardFsDriver(grid.Database.Path);

            dbDriver = new DatabaseDriver(fsdrv);
            GridCommons gridComm = dbDriver.LoadGrid(grid.ID, grid.Database);

            GridDat = new GridData(gridComm);
        }
コード例 #2
0
        public void Init()
        {
            string templateDatabasePath = "bosss_db_test_template.zip";

            // Temporary filesystem driver to unzip the test database.
            var tmpFsDriver = new StandardFsDriver(templateDatabasePath);

            databaseWithFiles = GetDatabaseCopy(Path.Combine(
                                                    Path.GetTempPath(), "BoSSS_DB_" + Path.GetRandomFileName()),
                                                tmpFsDriver.BasePath);

            emptyDatabase = CreateEmptyDatabase(Path.Combine(
                                                    Path.GetTempPath(), "BoSSS_DB_" + Path.GetRandomFileName()));
        }
コード例 #3
0
ファイル: StandardDBDriverTests.cs プロジェクト: xyuan/BoSSS
        public void Init()
        {
            string templateDatabasePath = "..\\..\\bosss_db_test_template.zip";

            // Temporary filesystem driver to unzip the test database.
            var tmpFsDriver = new StandardFsDriver(templateDatabasePath);

            // database with files in it
            m_DB1 = CreateTestDatabase(Path.Combine(
                                           Path.GetTempPath(), "BoSSS_DB_" + Path.GetRandomFileName()),
                                       tmpFsDriver.BasePath);

            // empty database
            m_DB2 = CreateTestDatabase(Path.Combine(
                                           Path.GetTempPath(), "BoSSS_DB_" + Path.GetRandomFileName()));
        }