Example #1
0
 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);
 }
Example #4
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (InnerConnection.State == ConnectionState.Open)
                {
                    InnerConnection.Close();
                }

                InnerConnection.Dispose();
            }

            GC.SuppressFinalize(this);
        }
Example #5
0
 public void DisposeInnerConnection()
 {
     InnerConnection.Dispose();
 }
Example #6
0
 protected override void Dispose(bool disposing)
 {
     InnerConnection?.Dispose();
 }