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

                InnerConnection.Dispose();
            }

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