ClearPoolByText() private static method

private static ClearPoolByText ( string key ) : void
key string
return void
コード例 #1
0
		public static void ClearPool(MySqlConnectionStringBuilder settings)
		{
			string key;
			try
			{
				key = MySqlPoolManager.GetKey(settings);
			}
			catch (MySqlException)
			{
				return;
			}
			MySqlPoolManager.ClearPoolByText(key);
		}
コード例 #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);
         }
     }
 }
コード例 #3
0
		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);
					}
				}
			}
		}