public async Task<bool> SaveDataSettingAsync(User user) { var result = this.jsonSerializer.Serialize(user); if (result == null) { return false; } return await this.SaveFileAsync(StorageFolder.MyFolder, StorageFile.DataSettings, FileType.json, result).ConfigureAwait(false); }
private async Task StoreContentAsync() { var user = new User { Name = this.Name, Age = int.Parse(this.Age) }; var result = await this.storageService.SaveDataSettingAsync(user).ConfigureAwait(false); if (!result) { //this.messageBoxService.ShowMessageAsync() } }