コード例 #1
0
        private bool ChangeDatabaseInterface(IDbConfig config, string databaseName)
        {
            if (!controller.DatabaseExists(config, databaseName))
            {
                return(false);
            }

            DatabaseInterface dbi;

            if (!dbInterfaces.TryGetValue(databaseName, out dbi))
            {
                dbi = new DatabaseInterface(controller, databaseName, hostString);
                dbInterfaces[databaseName] = dbi;
            }

            Database    = controller.GetDatabase(databaseName);
            dbInterface = dbi;
            return(true);
        }