private void BackupTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { var timer = (System.Timers.Timer)sender; timer.Interval = BACKUP_INTERVAL; Backup.Create(Data.DeviceInfos.ToList()); }
public void Stop() { if (stop != null) { stop.Set(); } if (listener != null) { try { listener.Stop(); listener.Close(); } catch (Exception ex) { } } StopBackupTimer(); Backup.Create(Data.DeviceInfos.ToList()); logger.Warn("Local Data Server Stopped"); }