Example #1
0
        public async Task ExecuteAsync()
        {
            await _backupRepository.CreateBackupAsync();

            var fileData = new FileData
            {
                ToDoItems = _settingsViewModel.InvertedToDoList
                ? _taskListViewModel.ToDoItems.Reverse()
                : _taskListViewModel.ToDoItems,
                DoneItems = _doneListViewModel.DoneItems,
                Settings  = new Settings
                {
                    InvertedToDoList = _settingsViewModel.InvertedToDoList
                }
            };

            await _fileDataRepository.UpdateFileDataAsync(fileData);
        }