RemoveConnection() public static method

public static RemoveConnection ( Driver driver ) : void
driver Driver
return void
コード例 #1
0
ファイル: Driver.cs プロジェクト: borllor/Roadlight.Net
 protected virtual void Dispose(bool disposing)
 {
     if (this.disposeInProgress)
     {
         return;
     }
     this.disposeInProgress = true;
     try
     {
         this.ResetTimeout(1000);
         if (disposing)
         {
             this.handler.Close(this.isOpen);
         }
         if (this.connectionString.Pooling)
         {
             MySqlPoolManager.RemoveConnection(this);
         }
     }
     catch (Exception)
     {
         if (disposing)
         {
             throw;
         }
     }
     finally
     {
         this.reader            = null;
         this.isOpen            = false;
         this.disposeInProgress = false;
     }
 }
コード例 #2
0
 protected virtual void Dispose(bool disposing)
 {
     // Avoid cyclic calls to Dispose.
     if (disposed)
     {
         return;
     }
     try
     {
         ResetTimeout(1000);
         handler.Close(isOpen);
         // if we are pooling, then release ourselves
         if (connectionString.Pooling)
         {
             MySqlPoolManager.RemoveConnection(this);
         }
     }
     catch (Exception)
     {
         if (disposing)
         {
             throw;
         }
     }
     finally
     {
         reader   = null;
         isOpen   = false;
         disposed = true;
     }
 }
コード例 #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.connectionString.Pooling)
     {
         MySqlPoolManager.RemoveConnection(this);
     }
     this.isOpen = false;
 }
コード例 #4
0
        public virtual void Close()
        {
            isOpen = false;

            // if we are pooling, then release ourselves
            if (connectionString.Pooling)
            {
                MySqlPoolManager.RemoveConnection(this);
            }
        }
コード例 #5
0
ファイル: Driver.cs プロジェクト: epdumitru/mysqlib
        protected virtual void Dispose(bool disposing)
        {
            // if we are pooling, then release ourselves
            if (connectionString.Pooling)
            {
                MySqlPoolManager.RemoveConnection(this);
            }

            isOpen = false;
        }
コード例 #6
0
ファイル: Driver.cs プロジェクト: idsyn/mysql-connector-net
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            // Avoid cyclic calls to Dispose.
            disposed = true;
            try
            {
                ResetTimeout(1000);
                handler.Close(IsOpen);
                // if we are pooling, then release ourselves
                if (ConnectionString.Pooling)
                {
                    MySqlPoolManager.RemoveConnection(this);
                }
            }
            catch (Exception ex)
            {
                if (disposing)
                {
                    MySqlException mysqlEx = ex as MySqlException;
                    if (mysqlEx == null)
                    {
                        MySqlTrace.LogError(0, ex.GetBaseException().Message);
                    }
                    else
                    {
                        MySqlTrace.LogError(mysqlEx.Number, ex.GetBaseException().Message);
                    }
                }
            }
            finally
            {
                reader = null;
                IsOpen = false;
            }
        }
コード例 #7
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.disposed)
     {
         return;
     }
     this.disposed = true;
     try
     {
         this.ResetTimeout(1000);
         this.handler.Close(this.isOpen);
         if (this.connectionString.Pooling)
         {
             MySqlPoolManager.RemoveConnection(this);
         }
     }
     catch (Exception ex2)
     {
         if (disposing)
         {
             MySqlException ex = ex2 as MySqlException;
             if (ex == null)
             {
                 MySqlTrace.LogError(0, ex2.GetBaseException().Message);
             }
             else
             {
                 MySqlTrace.LogError(ex.Number, ex2.GetBaseException().Message);
             }
         }
     }
     finally
     {
         this.reader = null;
         this.isOpen = false;
     }
 }