public override async Task SaveAsync() { PersistentRetailerSettings persistentSettings = new PersistentRetailerSettings { UserStores = _UserStores.ToArray() }; await _StorageReaderWriter.WriteAsync(persistentSettings); }
public override async Task LoadAsync() { PersistentRetailerSettings persistentSettings = await _StorageReaderWriter.ReadAsync <PersistentRetailerSettings>(); ClearUserStores(); if (persistentSettings == null || persistentSettings.UserStores == null) { return; } foreach (var userStore in persistentSettings.UserStores) { userStore.Retailer = Retailer; AddUserStore(userStore); } }