Exemple #1
0
		public static MySqlPool GetPool(MySqlConnectionStringBuilder settings) {
			string connectionString = settings.GetConnectionString(true);
			lock (pools.SyncRoot) {
				MySqlPool pool = pools[connectionString] as MySqlPool;
				if (pool == null) {
					pool = new MySqlPool(settings);
					pools.Add(connectionString, pool);
				} else {
					pool.Settings = settings;
				}
				return pool;
			}
		}
Exemple #2
0
        public static MySqlPool GetPool(MySqlConnectionStringBuilder settings)
        {
            string connectionString = settings.GetConnectionString(true);

            lock (pools.SyncRoot) {
                MySqlPool pool = pools[connectionString] as MySqlPool;
                if (pool == null)
                {
                    pool = new MySqlPool(settings);
                    pools.Add(connectionString, pool);
                }
                else
                {
                    pool.Settings = settings;
                }
                return(pool);
            }
        }
Exemple #3
0
 public static void ClearPool(MySqlConnectionStringBuilder settings)
 {
     ClearPoolByText(settings.GetConnectionString(true));
 }
Exemple #4
0
		public static void ClearPool(MySqlConnectionStringBuilder settings) {
			ClearPoolByText(settings.GetConnectionString(true));
		}