public static void AddDatabase(CHXDatabaseContainer database)
 {
     lock (_locker)
     {
         DatabaseCollection.Add(database);
         Save();
     }
 }
Beispiel #2
0
        public void Add(CHXDatabaseContainer database)
        {
            if (database == null)
            {
                return;
            }

            if (this[database.Name] == null)
            {
                databaseList.Add(database);
            }
        }
        public static void AddDatabase(string databaseName, CHXDatabaseParameters connectionParameters, CHXDatabaseType databaseType)
        {
            lock (_locker)
            {
                var db = new CHXDatabaseContainer()
                {
                    Name = databaseName
                };
                db.Database = new CHXDatabaseManager(new CHXDatabase.IO.CHXDatabase(connectionParameters, databaseType));

                AddDatabase(db);
            }
        }
Beispiel #4
0
        public CHXDatabaseContainer Add(string databaseName)
        {
            CHXDatabaseContainer db = null;

            if (this[databaseName] == null)
            {
                db = new CHXDatabaseContainer()
                {
                    Name = databaseName
                };

                this.Add(db);
            }

            return(db);
        }
Beispiel #5
0
        public CHXDatabaseContainer Add(string databaseName, CHXDatabaseParameters connectionParameters, CHXDatabaseType databaseType)
        {
            CHXDatabaseContainer db = null;

            if (this[databaseName] == null)
            {
                db = new CHXDatabaseContainer()
                {
                    Name = databaseName
                };
                db.Database = new CHXDatabaseManager(new CHXDatabase.IO.CHXDatabase(connectionParameters, databaseType));

                this.Add(db);
            }

            return(db);
        }