public void Shutdown() { var task = SaveDirtyFilesAsync(); shellService.AddTaskToCompleteBeforeShutdown(task); if (musicFilesToSaveAfterPlaying.Any()) { allFilesSavedCompletion = new TaskCompletionSource <object>(); shellService.AddTaskToCompleteBeforeShutdown(allFilesSavedCompletion.Task); } }
public void Shutdown() { if (cancellationTokenSources.Any()) { allTranscodingsCanceledCompletion = new TaskCompletionSource <object>(); CancelAll(); shellService.AddTaskToCompleteBeforeShutdown(allTranscodingsCanceledCompletion.Task); } }
public void Shutdown() { Task task = Task.Run(() => SaveCurrentSelectedFile()); shellService.AddTaskToCompleteBeforeShutdown(task); }
public void Shutdown() { var task = SaveCurrentSelectedFileAsync(); shellService.AddTaskToCompleteBeforeShutdown(task); }