Example #1
0
        internal void Close()
        {
            IDataReader obj = Interlocked.Exchange(ref m_dataReader, null);

            if (obj != null)
            {
                QueryExecutionUtils.DisposeDataExtensionObject(ref obj, "data reader", m_dataSet.Name, m_executionMetrics, DataProcessingMetrics.MetricType.DisposeDataReader);
            }
            m_commandWrappedForCancel = null;
            IDbCommand obj2 = Interlocked.Exchange(ref m_command, null);

            if (obj2 != null)
            {
                QueryExecutionUtils.DisposeDataExtensionObject(ref obj2, "command", m_dataSet.Name);
            }
            IDbConnection dbConnection = Interlocked.Exchange(ref m_connection, null);

            if (dbConnection != null)
            {
                RuntimeDataSource.CloseConnection(dbConnection, m_dataSource, m_odpContext, m_executionMetrics);
            }
        }
Example #2
0
 protected void DisposeDataExtensionObject <T>(ref T obj, string objectType, DataProcessingMetrics.MetricType?metricType) where T : class, IDisposable
 {
     QueryExecutionUtils.DisposeDataExtensionObject(ref obj, objectType, m_dataSet.Name.MarkAsPrivate(), m_executionMetrics, metricType);
 }
Example #3
0
 protected void DisposeDataExtensionObject <T>(ref T obj, string objectType) where T : class, IDisposable
 {
     QueryExecutionUtils.DisposeDataExtensionObject(ref obj, objectType, m_dataSet.Name.MarkAsPrivate());
 }