/// <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; } } }
/// <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; } } }