Beispiel #1
0
 /// <summary>
 /// Finalises or disposes of the object.
 /// </summary>
 /// <param name="disposing"></param>
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         _TransactionHelper.Abandon();
         if (_Connection != null)
         {
             _Connection.Dispose();
         }
         _Connection = null;
     }
 }
 /// <summary>
 /// Finalises or disposes of the object.
 /// </summary>
 /// <param name="disposing"></param>
 private void Dispose(bool disposing)
 {
     if(disposing) {
         if(_ClientTable != null) _ClientTable.Dispose();
         if(_SessionTable != null) _SessionTable.Dispose();
         _TransactionHelper.Abandon();
         if(_Connection != null) _Connection.Dispose();
         _Connection = null;
         _ClientTable = null;
         _SessionTable = null;
     }
 }
Beispiel #3
0
        /// <summary>
        /// Disposes of or finalises the object.
        /// </summary>
        /// <param name="disposing"></param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_TransactionHelper != null)
                {
                    _TransactionHelper.Abandon();
                }
                _TransactionHelper = null;

                if (_Connection != null)
                {
                    _Connection.Dispose();
                }
                _Connection = null;

                if (_UserTable != null)
                {
                    _UserTable.Dispose();
                }
                _UserTable = null;
            }
        }
Beispiel #4
0
        /// <summary>
        /// Disposes of or finalises the object. Note that the object is sealed.
        /// </summary>
        /// <param name="disposing"></param>
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                _TransactionHelper.Abandon();
                CloseConnection();

                if (_AircraftTable != null)
                {
                    _AircraftTable.Dispose();
                    _AircraftTable = null;
                }

                if (_FlightTable != null)
                {
                    _FlightTable.Dispose();
                    _FlightTable = null;
                }

                if (_DbHistoryTable != null)
                {
                    _DbHistoryTable.Dispose();
                    _DbHistoryTable = null;
                }

                if (_DbInfoTable != null)
                {
                    _DbInfoTable.Dispose();
                    _DbInfoTable = null;
                }

                if (_LocationsTable != null)
                {
                    _LocationsTable.Dispose();
                    _LocationsTable = null;
                }

                if (_SessionsTable != null)
                {
                    _SessionsTable.Dispose();
                    _SessionsTable = null;
                }

                if (_SystemEventsTable != null)
                {
                    _SystemEventsTable.Dispose();
                    _SystemEventsTable = null;
                }

                if (_ConfigurationStorage != null)
                {
                    _ConfigurationStorage.ConfigurationChanged -= ConfigurationStorage_ConfigurationChanged;
                    _ConfigurationStorage = null;
                }

                if (_DatabaseLog != null)
                {
                    _DatabaseLog.Flush();
                    _DatabaseLog.Dispose();
                    _DatabaseLog = null;
                }
            }
        }