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; } }
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; } }
protected virtual void Dispose(bool disposing) { if (this.connectionString.Pooling) { MySqlPoolManager.RemoveConnection(this); } this.isOpen = false; }
public virtual void Close() { isOpen = false; // if we are pooling, then release ourselves if (connectionString.Pooling) { MySqlPoolManager.RemoveConnection(this); } }
protected virtual void Dispose(bool disposing) { // if we are pooling, then release ourselves if (connectionString.Pooling) { MySqlPoolManager.RemoveConnection(this); } isOpen = false; }
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; } }
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; } }