private async Task onStatusTick(StatusTickMessage message) { await Task.Run(() => { allFiles.ForEach(f => { if (f.LastAccess.HasValue && (DateTime.Now - f.LastAccess.Value).Minutes > 2) { f.Header = null; f.LastAccess = null; } }); }); }
private async Task onStatusTick(StatusTickMessage message) { if ((DateTime.Now - lastSave).Seconds > 3 && viewModel.Settings.AreSettingsChanged) { mapper.Map(viewModel.Settings, settings); await settingsRepository.SaveSettings(settings); viewModel.Settings.AreSettingsChanged = false; lastSave = DateTime.Now; } }