protected override void Dispose(bool disposing) { if (disposing && InnerConnection != null) { InnerConnection.Dispose(); } InnerConnection = null; InnerProviderFactory = null; base.Dispose(disposing); }
/// <summary> /// dispose the underlying connection. /// </summary> /// <param name="disposing">false if pre-empted from a <c>finalizer</c></param> protected override void Dispose(bool disposing) { if (disposing && InnerConnection != null) { InnerConnection.StateChange -= StateChangeHandler; InnerConnection.Dispose(); } InnerConnection = null; DbProfiler = null; base.Dispose(disposing); }
protected override void Dispose(bool disposing) { _profiler.ConnectionDisposing(InnerConnection, NHProfilerContextProvider.GetLoggedDbConnection(InnerConnection)); if (disposing && InnerConnection != null) { InnerConnection.StateChange -= StateChangeHandler; InnerConnection.Dispose(); } InnerConnection = null; base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (InnerConnection.State == ConnectionState.Open) { InnerConnection.Close(); } InnerConnection.Dispose(); } GC.SuppressFinalize(this); }
public void DisposeInnerConnection() { InnerConnection.Dispose(); }
protected override void Dispose(bool disposing) { InnerConnection?.Dispose(); }