ClearPoolByText() private static method

private static ClearPoolByText ( string key ) : void
key string
return void
		public static void ClearPool(MySqlConnectionStringBuilder settings)
		{
			string key;
			try
			{
				key = MySqlPoolManager.GetKey(settings);
			}
			catch (MySqlException)
			{
				return;
			}
			MySqlPoolManager.ClearPoolByText(key);
		}
Example #2
0
 public static void ClearAllPools()
 {
     lock (MySqlPoolManager.pools)
     {
         List <string> list = new List <string>(MySqlPoolManager.pools.Count);
         foreach (string current in MySqlPoolManager.pools.Keys)
         {
             list.Add(current);
         }
         foreach (string current2 in list)
         {
             MySqlPoolManager.ClearPoolByText(current2);
         }
     }
 }
		public static void ClearAllPools()
		{
			Dictionary<string, MySqlPool> obj = MySqlPoolManager.pools;
			lock (obj)
			{
				List<string> list = new List<string>(MySqlPoolManager.pools.Count);
				foreach (string current in MySqlPoolManager.pools.Keys)
				{
					list.Add(current);
				}
				using (List<string>.Enumerator enumerator2 = list.GetEnumerator())
				{
					while (enumerator2.MoveNext())
					{
						MySqlPoolManager.ClearPoolByText(enumerator2.Current);
					}
				}
			}
		}