public static Database Open(string databasePath) { if (databasePath == null) { throw new ArgumentNullException(nameof(databasePath)); } PeygirDatabaseDataSet.ChangeDatabasePath(databasePath); var result = new Database(); InitializeDatabase(result, databasePath); Version.UpdateIfAppropriate(result); return(result); }
public void Flush() { if (!IsOpen) { throw new InvalidOperationException(); } string databasePath = CurrentDatabasePath; // Reconnect. Close(); PeygirDatabaseDataSet.ChangeDatabasePath(databasePath); InitializeDatabase(this, databasePath); }