public Database GetDatabaseWithoutOpening(string name, bool mustExist) { Database db = databases.Get(name); if (db == null) { if (!IsValidDatabaseName(name)) { throw new ArgumentException("Invalid database name: " + name); } if (options.IsReadOnly()) { mustExist = true; } string path = PathForName(name); if (path == null) { return null; } db = new Database(path, this); if (mustExist && !db.Exists()) { Log.W(Database.Tag, "mustExist is true and db (%s) does not exist", name); return null; } db.SetName(name); databases.Put(name, db); } return db; }