private async Task CheckForBackup() { DebugEvent.SaveText("CheckForBackup", "NextBackup: " + viewModel.Config.NextScheduledBackup); BackupConfig config = viewModel.Config; if (config == null || config.NextScheduledBackup > DateTime.Now) { return; } BackupTask backupTask = viewModel.BackupTask; if (config.IsBackupEnabled && (backupTask == null || backupTask.Result.HasValue)) { await BackupAsync(); } }
public static IEnumerable <DebugEvent> GetEvents(string eventsDataString) { var array = Split(eventsDataString, eventSplitter).ToArray(); foreach (string eventDataString in array) { DebugEvent debugEvent = null; try { debugEvent = new DebugEvent(eventDataString); } catch { } if (debugEvent != null) { yield return(debugEvent); } } }
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { DebugEvent.SaveText("DispatcherUnhandledException", e.Exception.ToString(), e.Exception.StackTrace); }