protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
public virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { db.Dispose(); } this.disposed = true; } }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { db.Dispose(); } disposed = true; } }
private void StopService() { try { logger.Info("Stopping messenger"); StopMessenger(); logger.Info("Stop poller"); StopPoller(); // Dispose database if (database != null) { database.Dispose(); } } catch (Exception ex) { logger.Error("Error stopping service", ex); } }