Example #1
0
        public override async Task SaveAsync()
        {
            PersistentRetailerSettings persistentSettings = new PersistentRetailerSettings
            {
                UserStores = _UserStores.ToArray()
            };

            await _StorageReaderWriter.WriteAsync(persistentSettings);
        }
Example #2
0
        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);
            }
        }