protected internal static IRuntimeDatabaseConfiguration ConfigurationForDatabase(string databaseName, DatabaseSettingsSerialization.Source source, DatabaseSettingsSerialization.User user) { if (string.IsNullOrEmpty(databaseName) || (databaseName == Constants.SystemDatabaseLogicalName) || (databaseName == ForSystemDatabase.DatabaseServices.DatabaseConfiguration.DatabaseIdentifier)) { return(null); } using (var trans = ForSystemDatabase.GetCommitableTransaction()) { var eSpaceParams = DBRuntimePlatform.Instance.GetCatalogDetailsByName(trans, databaseName, user); if (eSpaceParams == null) { return(null); } var baseConf = RuntimeDatabaseConfigurations.For( CurrentPlatformDatabasesPluginProvider, source, user); baseConf.SetParameters(eSpaceParams); return(baseConf); } }
protected internal static IRuntimeDatabaseConfiguration LoadConfigurationForESpace(int eSpaceId) { using (var trans = ForSystemDatabase.GetCommitableTransaction()) { var details = DBRuntimePlatform.Instance.GetCatalogDetailsByESpaceId(trans, eSpaceId); if (details == null) { return(null); } var conf = RuntimeDatabaseConfigurations.For( PlatformDatabasePluginProvider, AccessRequester, DatabaseSettingsSerialization.User.Runtime); conf.SetParameters(details); return(conf); } }