Пример #1
0
        public DatabaseContainer()
        {
            this.databases = new Dictionary <string, IDatabase>();
            IDatabase systemDatabase = DefaultDataConstructor.CreateSystemDatabase();

            this.databases.Add(systemDatabase.databaseName, systemDatabase);
            this.databases.Add(SystemeConstants.DefaultDatabaseName, new Database(SystemeConstants.DefaultDatabaseName));
        }
        private void CreateSystemDatabases(ISystemeDatabaseModule databaseModule)
        {
            IDatabaseContainer databaseContainer = databaseModule.GetDatabaseContainer();

            if (!databaseContainer.ExistDatabase(SystemeConstants.SystemDatabaseName))
            {
                databaseModule.AddDatabase(DefaultDataConstructor.CreateSystemDatabase());
            }
            else
            {
                DefaultDataConstructor.CompleteSystemDatabase(databaseModule.GetDatabaseContainer().GetDatabase(SystemeConstants.SystemDatabaseName));
            }
        }