private void BlueprintList_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { string json = JsonConvert.SerializeObject(BlueprintList); SetValue("BlueprintList", CryptoService.Encrypt(json, AppSettingsKey)); OnUpdateBlueprintList?.Invoke(this, BlueprintList.ToArray()); }
private void PopulateBlueprintListFromStorage() { try { string encryptedData = GetValue("BlueprintList", ""); if (string.IsNullOrEmpty(encryptedData)) { return; } string json = CryptoService.Decrypt(encryptedData, AppSettingsKey); BlueprintRegistryItem[] items = JsonConvert.DeserializeObject <BlueprintRegistryItem[]>(json); if (items == null) { return; } foreach (BlueprintRegistryItem item in items) { BlueprintList.Add(item); } } catch (Exception) { } }
public async Task GetBlueprints_ValidRequest_HasResult() { BlueprintList res = (await _validKey.Characters[0].GetBlueprintsAsync()).Result; }
public async Task GetBlueprints_ValidRequest_HasResult() { BlueprintList res = (await _validKey.Corporation.GetBlueprintsAsync()).Result; Assert.IsTrue(res.Blueprints.Any()); }